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

◆ SendToAsync()

ValueTask< int > System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendToAsync ( Socket socket,
CancellationToken cancellationToken )
inline

Definition at line 239 of file Socket.cs.

240 {
241 if (socket.SendToAsync(this, cancellationToken))
242 {
244 return new ValueTask<int>(this, _token);
245 }
246 int bytesTransferred = base.BytesTransferred;
247 SocketError socketError = base.SocketError;
248 Release();
249 if (socketError != 0)
250 {
252 }
254 }
Exception CreateException(SocketError error, bool forAsyncThrow=true)
Definition Socket.cs:503
static ValueTask FromException(Exception exception)
Definition ValueTask.cs:190

References System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs._cancellationToken, System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs._token, System.cancellationToken, System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.CreateException(), System.Threading.Tasks.ValueTask< TResult >.FromException(), and System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.Release().