26 optionLength = optionValueSeconds.Length;
49 if (optionValueSeconds ==
null || optionValueSeconds.Length < 4)
81 return socketError == SocketError.Success && socketError2 ==
SocketError.Success;
86 return (
int)(milliseconds / 1000);
91 return (uint)(seconds * 1000);
static bool TryWriteBytes(Span< byte > destination, bool value)
static int ToInt32(byte[] value, int startIndex)
static byte[] s_keepAliveValuesBuffer
static SocketError Set(SafeSocketHandle handle, SocketOptionName optionName, int optionValueSeconds)
static readonly ConditionalWeakTable< SafeSocketHandle, IOControlKeepAlive > s_socketKeepAliveTable
static bool SupportsKeepAliveViaSocketOption()
static readonly bool s_supportsKeepAliveViaSocketOption
static int MillisecondsToSeconds(uint milliseconds)
static SocketError Set(SafeSocketHandle handle, SocketOptionName optionName, byte[] optionValueSeconds)
static uint SecondsToMilliseconds(int seconds)
static SocketError Get(SafeSocketHandle handle, SocketOptionName optionName, byte[] optionValueSeconds, ref int optionLength)
static int Get(SafeSocketHandle handle, SocketOptionName optionName)
static SocketError WindowsIoctl(SafeSocketHandle handle, int ioControlCode, byte[] optionInValue, byte[] optionOutValue, out int optionLength)