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

◆ SetLingerOption()

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

Definition at line 561 of file SocketPal.cs.

562 {
563 global::Interop.Winsock.Linger linger = default(global::Interop.Winsock.Linger);
564 linger.OnOff = (ushort)(optionValue.Enabled ? 1 : 0);
565 linger.Time = (ushort)optionValue.LingerTime;
566 SocketError socketError = global::Interop.Winsock.setsockopt(handle, SocketOptionLevel.Socket, SocketOptionName.Linger, ref linger, 4);
567 if (socketError != SocketError.SocketError)
568 {
569 return SocketError.Success;
570 }
571 return GetLastSocketError();
572 }
static SocketError GetLastSocketError()
Definition SocketPal.cs:22

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

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