Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Handshake()

void System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.Handshake ( )
inlineprivate

Definition at line 133 of file SmtpConnection.cs.

134 {
135 _connection._responseReader = new SmtpReplyReaderFactory(_connection._networkStream);
136 SmtpReplyReader nextReplyReader = _connection.Reader.GetNextReplyReader();
137 IAsyncResult asyncResult = nextReplyReader.BeginReadLine(s_handshakeCallback, this);
138 if (!asyncResult.CompletedSynchronously)
139 {
140 return;
141 }
142 LineInfo lineInfo = nextReplyReader.EndReadLine(asyncResult);
143 if (lineInfo.StatusCode != SmtpStatusCode.ServiceReady)
144 {
145 throw new SmtpException(lineInfo.StatusCode, lineInfo.Line, serverResponse: true);
146 }
147 try
148 {
149 SendEHello();
150 }
151 catch
152 {
153 SendHello();
154 }
155 }
SmtpReplyReaderFactory Reader
IAsyncResult BeginReadLine(AsyncCallback callback, object state)

References System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult._connection, System.Net.Mail.SmtpConnection._networkStream, System.asyncResult, System.Net.Mail.SmtpReplyReader.BeginReadLine(), System.Net.Mail.SmtpReplyReader.EndReadLine(), System.Net.Mail.SmtpReplyReaderFactory.GetNextReplyReader(), System.Net.Mail.LineInfo.Line, System.Net.Mail.SmtpConnection.Reader, System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.s_handshakeCallback, System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.SendEHello(), System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.SendHello(), and System.Net.Mail.LineInfo.StatusCode.

Referenced by System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.InitializeConnection(), and System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.InitializeConnectionCallback().