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

◆ SendAsync()

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

Definition at line 190 of file Socket.cs.

191 {
192 if (socket.SendAsync(this, cancellationToken))
193 {
195 return new ValueTask<int>(this, _token);
196 }
197 int bytesTransferred = base.BytesTransferred;
198 SocketError socketError = base.SocketError;
199 Release();
200 if (socketError != 0)
201 {
203 }
205 }
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().