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

◆ SetSocketOption() [2/5]

void System.Net.Sockets.Socket.SetSocketOption ( SocketOptionLevel optionLevel,
SocketOptionName optionName,
byte[] optionValue )
inline

Definition at line 2153 of file Socket.cs.

2154 {
2156 if (System.Net.NetEventSource.Log.IsEnabled())
2157 {
2158 System.Net.NetEventSource.Info(this, $"optionLevel:{optionLevel} optionName:{optionName} optionValue:{optionValue}", "SetSocketOption");
2159 }
2160 SocketError socketError = SocketPal.SetSockOpt(_handle, optionLevel, optionName, optionValue);
2161 if (System.Net.NetEventSource.Log.IsEnabled())
2162 {
2163 System.Net.NetEventSource.Info(this, $"SetSockOpt returns errorCode:{socketError}", "SetSocketOption");
2164 }
2165 if (socketError != 0)
2166 {
2168 }
2169 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
SafeSocketHandle _handle
Definition Socket.cs:533
void UpdateStatusAfterSocketErrorAndThrowException(SocketError error, [CallerMemberName] string callerName=null)
Definition Socket.cs:3715

References System.Net.Sockets.Socket._handle, System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.Net.Sockets.SocketPal.SetSockOpt(), System.Net.Sockets.Socket.ThrowIfDisposed(), and System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException().