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

◆ BeginSend()

static IAsyncResult System.Net.Mail.CheckCommand.BeginSend ( SmtpConnection conn,
AsyncCallback callback,
object state )
inlinestaticpackage

Definition at line 12 of file CheckCommand.cs.

13 {
14 MultiAsyncResult multiAsyncResult = new MultiAsyncResult(conn, callback, state);
15 multiAsyncResult.Enter();
16 IAsyncResult asyncResult = conn.BeginFlush(s_onWrite, multiAsyncResult);
17 if (asyncResult.CompletedSynchronously)
18 {
19 conn.EndFlush(asyncResult);
20 multiAsyncResult.Leave();
21 }
22 SmtpReplyReader nextReplyReader = conn.Reader.GetNextReplyReader();
23 multiAsyncResult.Enter();
24 IAsyncResult asyncResult2 = nextReplyReader.BeginReadLine(s_onReadLine, multiAsyncResult);
25 if (asyncResult2.CompletedSynchronously)
26 {
27 LineInfo lineInfo = nextReplyReader.EndReadLine(asyncResult2);
28 if (!(multiAsyncResult.Result is Exception))
29 {
30 multiAsyncResult.Result = lineInfo;
31 }
32 multiAsyncResult.Leave();
33 }
34 multiAsyncResult.CompleteSequence();
35 return multiAsyncResult;
36 }
static readonly AsyncCallback s_onReadLine
static readonly AsyncCallback s_onWrite

References System.asyncResult, System.Net.Mail.SmtpConnection.BeginFlush(), System.Net.Mail.SmtpReplyReader.BeginReadLine(), System.IAsyncResult.CompletedSynchronously, System.Net.Mime.MultiAsyncResult.CompleteSequence(), System.Net.Mail.SmtpConnection.EndFlush(), System.Net.Mail.SmtpReplyReader.EndReadLine(), System.Net.Mime.MultiAsyncResult.Enter(), System.Net.Mail.SmtpReplyReaderFactory.GetNextReplyReader(), System.Net.Mime.MultiAsyncResult.Leave(), System.Net.Mail.SmtpConnection.Reader, System.Net.LazyAsyncResult.Result, System.Net.Mail.CheckCommand.s_onReadLine, System.Net.Mail.CheckCommand.s_onWrite, and System.state.

Referenced by System.Net.Mail.DataCommand.BeginSend(), System.Net.Mail.StartTlsCommand.BeginSend(), System.Net.Mail.MailCommand.BeginSend(), System.Net.Mail.HelloCommand.BeginSend(), and System.Net.Mail.RecipientCommand.BeginSend().