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

◆ SendPacketsAsync() [2/2]

bool System.Net.Sockets.Socket.SendPacketsAsync ( SocketAsyncEventArgs e,
CancellationToken cancellationToken )
inlineprivate

Definition at line 3135 of file Socket.cs.

3136 {
3138 if (e == null)
3139 {
3140 throw new ArgumentNullException("e");
3141 }
3142 if (e.SendPacketsElements == null)
3143 {
3144 throw new ArgumentException(System.SR.Format(System.SR.InvalidNullArgument, "e.SendPacketsElements"), "e");
3145 }
3146 if (!Connected)
3147 {
3148 throw new NotSupportedException(System.SR.net_notconnected);
3149 }
3150 e.StartOperationCommon(this, SocketAsyncOperation.SendPackets);
3151 SocketError socketError;
3152 try
3153 {
3154 socketError = e.DoOperationSendPackets(this, _handle, cancellationToken);
3155 }
3156 catch (Exception)
3157 {
3158 e.Complete();
3159 throw;
3160 }
3161 return socketError == SocketError.IOPending;
3162 }
SafeSocketHandle _handle
Definition Socket.cs:533
static string InvalidNullArgument
Definition SR.cs:86
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string net_notconnected
Definition SR.cs:24
Definition SR.cs:7

References System.Net.Sockets.Socket._handle, System.cancellationToken, System.Net.Sockets.SocketAsyncEventArgs.Complete(), System.Net.Sockets.Socket.Connected, System.Net.Sockets.SocketAsyncEventArgs.DoOperationSendPackets(), System.SR.Format(), System.SR.InvalidNullArgument, System.SR.net_notconnected, System.Net.Sockets.SocketAsyncEventArgs.SendPacketsElements, System.Net.Sockets.SocketAsyncEventArgs.StartOperationCommon(), and System.Net.Sockets.Socket.ThrowIfDisposed().