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

◆ WriteAsync() [3/3]

override ValueTask System.Net.Sockets.NetworkStream.WriteAsync ( ReadOnlyMemory< byte > buffer,
CancellationToken cancellationToken )
inlinevirtual

Reimplemented from System.IO.Stream.

Definition at line 438 of file NetworkStream.cs.

439 {
440 bool canWrite = CanWrite;
442 if (!canWrite)
443 {
445 }
446 try
447 {
449 }
450 catch (Exception ex) when (!(ex is OutOfMemoryException))
451 {
453 }
454 }
static IOException WrapException(string resourceFormatString, Exception innerException)
ValueTask SendAsyncForNetworkStream(ReadOnlyMemory< byte > buffer, SocketFlags socketFlags, CancellationToken cancellationToken)
Definition Socket.cs:4145
static string net_readonlystream
Definition SR.cs:152
static string net_io_writefailure
Definition SR.cs:92
Definition SR.cs:7

References System.Net.Sockets.NetworkStream._streamSocket, System.buffer, System.cancellationToken, System.Net.Sockets.NetworkStream.CanWrite, System.SR.net_io_writefailure, System.SR.net_readonlystream, System.Net.Sockets.Socket.SendAsyncForNetworkStream(), System.Net.Sockets.NetworkStream.ThrowIfDisposed(), and System.Net.Sockets.NetworkStream.WrapException().