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

◆ GetLingerOption()

static SocketError System.Net.Sockets.SocketPal.GetLingerOption ( SafeSocketHandle handle,
out LingerOption optionValue )
inlinestatic

Definition at line 657 of file SocketPal.cs.

658 {
659 global::Interop.Winsock.Linger optionValue2 = default(global::Interop.Winsock.Linger);
660 int optionLength = 4;
661 SocketError socketError = global::Interop.Winsock.getsockopt(handle, SocketOptionLevel.Socket, SocketOptionName.Linger, out optionValue2, ref optionLength);
662 if (socketError == SocketError.SocketError)
663 {
664 optionValue = null;
665 return GetLastSocketError();
666 }
667 optionValue = new LingerOption(optionValue2.OnOff != 0, optionValue2.Time);
668 return SocketError.Success;
669 }
static SocketError GetLastSocketError()
Definition SocketPal.cs:22

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

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