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

◆ SendAsyncForNetworkStream()

ValueTask System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendAsyncForNetworkStream ( Socket socket,
CancellationToken cancellationToken )
inline

Definition at line 207 of file Socket.cs.

208 {
209 if (socket.SendAsync(this, cancellationToken))
210 {
212 return new ValueTask(this, _token);
213 }
214 SocketError socketError = base.SocketError;
215 Release();
216 if (socketError != 0)
217 {
219 }
220 return default(ValueTask);
221 }
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().