private static void TlsStreamAuthenticateCallback(IAsyncResult result)
{
if (!result.CompletedSynchronously)
{
ConnectAndHandshakeAsyncResult thisPtr = (ConnectAndHandshakeAsyncResult)result.AsyncState;
try
{
(thisPtr._connection._networkStream as TlsStream).EndAuthenticateAsClient(result);
thisPtr._connection._responseReader = new SmtpReplyReaderFactory(thisPtr._connection._networkStream);
thisPtr.SendEHello();
}
catch (Exception e)
{
thisPtr.InvokeCallback(e);
}
}
}