コード例 #1
0
 static void DeRegisterServer(WebServer server)
 {
     lock (serverList) {
         serverList.Remove(server);
     }
     WebSocketFrameDispatcher.RemoveListener(server);
 }
コード例 #2
0
 static void RegisterServer(WebServer server)
 {
     lock (serverList) {
         serverList.Add(server);
     }
     WebSocketFrameDispatcher.AddListener(server);
 }
コード例 #3
0
 public void Start()
 {
     while (Connected)
     {
         WebSocketFrame incomingFrame = ReadMessage();
         WebSocketFrame outgoingFrame = Process(incomingFrame);
         if (outgoingFrame != null)
         {
             WebSocketFrameDispatcher.Dispatch(outgoingFrame);
         }
     }
 }