コード例 #1
0
        private void SendBytes(byte[] data)
        {
            var session = coreServer.GetSession(ClientSocket);

            ClientSocket.Send(data);

            ReleaseSession();

            /*
             * Client.BeginReceive(session.SessionStorage, 0,
             *  Server.GlobalInstance.BufferSize,
             *  SocketFlags.None,
             *  Server.GlobalInstance.ReceiveCallback,
             *  Client); */
        }
コード例 #2
0
 private void TryGetSession()
 {
     for (int i = 0; i < 3; i++)
     {
         session = coreServer.GetSession(clientSocket);
         if (session != null)
         {
             return;
         }
         else
         {
             Thread.Sleep(100);
         }
     }
 }
コード例 #3
0
 public SocketSession GetSession(Socket clientSocket)
 {
     return(realServer.GetSession(clientSocket));
 }