Пример #1
0
 void SocketConnected(IAsyncResult state)
 {
     if (socket.Connected)
     {
         client = new SocketCommunicationClient(socket);
         client.DataAvailable += Client_DataAvailable;
         game.newGame(false);
         RenderFromThread();
         Console.WriteLine("M-am conectat");
     }
 }
Пример #2
0
 private void Server_ClientAvailable(object sender, CommunicationListenerEventArgs e)
 {
     if (!havePlayer)
     {
         client = e.Client;
         client.DataAvailable += Client_DataAvailable;
         havePlayer            = true;
         SendClientTurnMessage();
         RenderFromThread();
     }
 }