PerformServerHandshake() public method

public PerformServerHandshake ( X509Certificate serverCertificate ) : void
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate
return void
示例#1
0
 private void Thread()
 {
     try {
         NetworkStream ns      = _client.GetStream();
         SecureSession session = new SecureSession(ns, _securityParameters);
         session.PerformServerHandshake(null);
         if (session.Receive() != null)
         {
             session.Send(Encoding.UTF8.GetBytes(RESPONSE));
         }
         session.Close();
         Console.WriteLine("Finish reader thread");
     } catch (Exception) {}
 }