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

◆ GetSocketErrorFromFaultedTask()

static SocketError System.Net.Sockets.Socket.GetSocketErrorFromFaultedTask ( Task t)
inlinestaticprivate

Definition at line 3854 of file Socket.cs.

3855 {
3856 if (t.IsCanceled)
3857 {
3858 return SocketError.OperationAborted;
3859 }
3861 if (!(innerException is SocketException { SocketErrorCode: var socketErrorCode }))
3862 {
3863 if (!(innerException is ObjectDisposedException))
3864 {
3865 if (innerException is OperationCanceledException)
3866 {
3867 return SocketError.OperationAborted;
3868 }
3869 return SocketError.SocketError;
3870 }
3871 return SocketError.OperationAborted;
3872 }
3873 return socketErrorCode;
3874 }
Exception? InnerException
Definition Exception.cs:104
AggregateException? Exception
Definition Task.cs:1014

References System.Threading.Tasks.Task< TResult >.Exception, System.Exception.InnerException, and System.Threading.Tasks.Task< TResult >.IsCanceled.

Referenced by System.Net.Sockets.Socket.BeginReceive(), System.Net.Sockets.Socket.BeginReceive(), System.Net.Sockets.Socket.BeginSend(), System.Net.Sockets.Socket.BeginSend(), and System.Net.Sockets.Socket.EndSendReceive().