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

◆ CreateException()

Exception System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.CreateException ( SocketError error,
bool forAsyncThrow = true )
inlineprivate

Definition at line 503 of file Socket.cs.

504 {
505 Exception ex = (Exception)(object)new SocketException((int)error);
506 if (forAsyncThrow)
507 {
509 }
511 {
512 return ex;
513 }
514 return new IOException(System.SR.Format(_isReadForCaching ? System.SR.net_io_readfailure : System.SR.net_io_writefailure, ex.Message), ex);
515 }
static string net_io_readfailure
Definition SR.cs:158
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs._isReadForCaching, System.SR.Format(), System.SR.net_io_readfailure, System.SR.net_io_writefailure, System.Runtime.ExceptionServices.ExceptionDispatchInfo.SetCurrentStackTrace(), and System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.WrapExceptionsForNetworkStream.

Referenced by System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.AcceptAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ConnectAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.DisconnectAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ReceiveAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ReceiveFromAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ReceiveMessageFromAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendAsyncForNetworkStream(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendPacketsAsync(), System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendToAsync(), and System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException().