Пример #1
0
 public KSPWebSocketService(IKSPAPI kspAPI, Servers.AsynchronousServer.ClientConnection clientConnection)
     : this(kspAPI)
 {
     this.clientConnection = clientConnection;
     streamTimer.Interval = streamRate;
     streamTimer.Elapsed += streamData;
     streamTimer.Enabled = true;
 }
 public KSPWebSocketService(IKSPAPI kspAPI, Servers.AsynchronousServer.ClientConnection clientConnection, IterationToEvent<UpdateTimerEventArgs> gameLoopEvent)
     : this(kspAPI, gameLoopEvent)
 {
     this.clientConnection = clientConnection;
     streamTimer.Interval = streamRate;
     streamTimer.Elapsed += streamData;
     streamTimer.Enabled = true;
 }
 public IWebSocketService buildService(Servers.AsynchronousServer.ClientConnection clientConnection)
 {
     return new WebSocketEchoService();
 }
 static void server_ServerNotify(object sender, Servers.NotifyEventArgs e)
 {
     Console.WriteLine(e.message);
 }
Пример #5
0
 public IWebSocketService buildService(Servers.AsynchronousServer.ClientConnection clientConnection)
 {
     return new KSPWebSocketService(kspAPI, clientConnection);
 }
 public FrameEventArgs(WebSocketFrame frame, Servers.AsynchronousServer.ClientConnection clientConnection)
 {
     this.frame = frame;
     this.clientConnection = clientConnection;
 }