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

◆ InternalSetBlocking() [2/2]

SocketError System.Net.Sockets.Socket.InternalSetBlocking ( bool desired,
out bool current )
inlineprivate

Definition at line 3592 of file Socket.cs.

3593 {
3594 if (Disposed)
3595 {
3596 current = _willBlock;
3597 return SocketError.Success;
3598 }
3599 bool willBlock = false;
3600 SocketError socketError;
3601 try
3602 {
3603 socketError = SocketPal.SetBlocking(_handle, desired, out willBlock);
3604 }
3605 catch (ObjectDisposedException)
3606 {
3607 socketError = SocketError.NotSocket;
3608 }
3609 if (System.Net.NetEventSource.Log.IsEnabled())
3610 {
3611 System.Net.NetEventSource.Info(this, $"SetBlocking returns errorCode:{socketError}", "InternalSetBlocking");
3612 }
3613 if (socketError == SocketError.Success)
3614 {
3616 }
3617 if (System.Net.NetEventSource.Log.IsEnabled())
3618 {
3619 System.Net.NetEventSource.Info(this, $"errorCode:{socketError} willBlock:{_willBlock} willBlockInternal:{_willBlockInternal}", "InternalSetBlocking");
3620 }
3621 current = _willBlockInternal;
3622 return socketError;
3623 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
SafeSocketHandle _handle
Definition Socket.cs:533

References System.Net.Sockets.Socket._handle, System.Net.Sockets.Socket._willBlock, System.Net.Sockets.Socket._willBlockInternal, System.Net.Sockets.Socket.Disposed, System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, and System.Net.Sockets.SocketPal.SetBlocking().

Referenced by System.Net.Sockets.Socket.Socket(), System.Net.Sockets.Socket.InternalSetBlocking(), and System.Net.Sockets.Socket.Shutdown().