Пример #1
0
 void Client_OnNewData(CClient Client, Byte bPacket, Byte[] arr_bArguments)
 {
     if (this.OnNewData != null)
     {
         this.OnNewData.Invoke(Client, bPacket, arr_bArguments);
     }
 }
Пример #2
0
 void Client_OnLostClient(CClient Client)
 {
     if (this.OnLostClient != null)
     {
         this.OnLostClient.Invoke(Client);
     }
 }
Пример #3
0
        void SSL_BeginAuthenticateAsServer_Callback(IAsyncResult iar)
        {
            try
            {
                var Connection = (SConnection)iar.AsyncState;

                Connection.ClientStream.EndAuthenticateAsServer(iar);

                CClient Client = new CClient(Connection.ClientStream, Connection.ClientSocket);
                Client.OnLostClient += Client_OnLostClient;
                Client.OnNewData    += Client_OnNewData;
                if (Client.Start())
                {
                    if (this.OnNewClient != null)
                    {
                        this.OnNewClient.Invoke(Client);
                    }
                }
            }
            catch
            {
            }
        }