Beispiel #1
0
 private void EndAuthenticate(IAsyncResult ar)
 {
     try
     {
         SslClient.EndAuthenticateAsServer(ar);
         ClientBuffer = new byte[HeaderSize];
         ClientMS     = new MemoryStream();
         SslClient.BeginRead(ClientBuffer, 0, ClientBuffer.Length, ReadClientData, null);
     }
     catch
     {
         SslClient?.Dispose();
         TcpClient?.Dispose();
     }
 }
Beispiel #2
0
 private void EndAuthenticate(IAsyncResult ar)
 {
     try
     {
         SslClient.EndAuthenticateAsServer(ar);
         ClientBuffer = new byte[4];
         ClientMS     = new MemoryStream();
         SslClient.BeginRead(ClientBuffer, 0, ClientBuffer.Length, ReadClientData, null);
     }
     catch
     {
         //Settings.Blocked.Add(ClientSocket.RemoteEndPoint.ToString().Split(':')[0]);
         SslClient?.Dispose();
         TcpClient?.Dispose();
     }
 }
Beispiel #3
0
 private void EndAuthenticate(IAsyncResult ar)
 {
     try
     {
         SslClient.EndAuthenticateAsServer(ar);
         Offset       = 0;
         HeaderSize   = 4;
         ClientBuffer = new byte[HeaderSize];
         SslClient.BeginRead(ClientBuffer, (int)Offset, (int)HeaderSize, ReadClientData, null);
     }
     catch
     {
         SslClient?.Dispose();
         TcpClient?.Dispose();
     }
 }