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

◆ EnableReuseUnicastPort()

void System.Net.Sockets.Socket.EnableReuseUnicastPort ( )
inlineprivate

Definition at line 4476 of file Socket.cs.

4477 {
4478 int optionValue = 1;
4479 SocketError socketError = global::Interop.Winsock.setsockopt(_handle, SocketOptionLevel.Socket, SocketOptionName.ReuseUnicastPort, ref optionValue, 4);
4480 if (System.Net.NetEventSource.Log.IsEnabled() && socketError != 0)
4481 {
4482 socketError = SocketPal.GetLastSocketError();
4483 System.Net.NetEventSource.Info($"Enabling SO_REUSE_UNICASTPORT failed with error code: {socketError}", null, "EnableReuseUnicastPort");
4484 }
4485 }
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.SocketPal.GetLastSocketError(), System.Net.NetEventSource.Info(), and System.Net.NetEventSource.Log.

Referenced by System.Net.Sockets.Socket.WildcardBindForConnectIfNecessary().