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

◆ GetSockOpt() [1/2]

static unsafe SocketError System.Net.Sockets.SocketPal.GetSockOpt ( SafeSocketHandle handle,
SocketOptionLevel optionLevel,
SocketOptionName optionName,
byte[] optionValue,
ref int optionLength )
inlinestatic

Definition at line 597 of file SocketPal.cs.

598 {
599 if (optionLevel == SocketOptionLevel.Tcp && (optionName == SocketOptionName.TypeOfService || optionName == SocketOptionName.BlockSource) && IOControlKeepAlive.IsNeeded)
600 {
601 return IOControlKeepAlive.Get(handle, optionName, optionValue, ref optionLength);
602 }
604 {
605 SocketError socketError = global::Interop.Winsock.getsockopt(handle, optionLevel, optionName, optionValue2, ref optionLength);
606 if (socketError != SocketError.SocketError)
607 {
608 return SocketError.Success;
609 }
610 return GetLastSocketError();
611 }
612 }
static SocketError GetLastSocketError()
Definition SocketPal.cs:22

References System.Net.Sockets.IOControlKeepAlive.Get(), System.Net.Sockets.SocketPal.GetLastSocketError(), System.handle, and System.Net.Sockets.IOControlKeepAlive.IsNeeded.