static void DeRegisterServer(WebServer server) { lock (serverList) { serverList.Remove(server); } WebSocketFrameDispatcher.RemoveListener(server); }
static void RegisterServer(WebServer server) { lock (serverList) { serverList.Add(server); } WebSocketFrameDispatcher.AddListener(server); }
public void Start() { while (Connected) { WebSocketFrame incomingFrame = ReadMessage(); WebSocketFrame outgoingFrame = Process(incomingFrame); if (outgoingFrame != null) { WebSocketFrameDispatcher.Dispatch(outgoingFrame); } } }