37 references to Socket
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1777
socket.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.KeepAlive, true);
System.Net.Sockets (36)
System\Net\Sockets\NetworkStream.cs (4)
123
int timeout = (int)_streamSocket.GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveTimeout)!;
150
int timeout = (int)_streamSocket.GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendTimeout)!;
699
_streamSocket.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendTimeout, timeout, silent);
708
_streamSocket.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveTimeout, timeout, silent);
System\Net\Sockets\SafeSocketHandle.Unix.cs (2)
86
case SocketOptionLevel.
Socket
:
208
Interop.Error err = Interop.Sys.GetSockOpt(handle, SocketOptionLevel.
Socket
, SocketOptionName.Type, (byte*)&type, &optLen);
System\Net\Sockets\Socket.cs (17)
500
return (int)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ExclusiveAddressUse)! != 0 ? true : false;
508
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ExclusiveAddressUse, value ? 1 : 0);
516
return (int)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveBuffer)!;
522
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveBuffer, value);
530
return (int)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendBuffer)!;
537
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendBuffer, value);
546
return (int)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveTimeout)!;
557
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveTimeout, value);
566
return (int)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendTimeout)!;
578
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendTimeout, value);
589
return (LingerOption?)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.Linger);
595
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.Linger, value!);
731
return (int)GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.Broadcast)! != 0 ? true : false;
736
SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.Broadcast, value ? 1 : 0);
2120
if (optionLevel == SocketOptionLevel.
Socket
&& optionName == SocketOptionName.Linger)
2187
if (optionLevel == SocketOptionLevel.
Socket
&& optionName == SocketOptionName.Linger)
3460
SocketOptionLevel.
Socket
,
System\Net\Sockets\SocketPal.Unix.cs (4)
1435
if (optionLevel == SocketOptionLevel.
Socket
)
1580
return GetErrorAndTrackSetting(handle, SocketOptionLevel.
Socket
, SocketOptionName.Linger, err);
1602
if (optionLevel == SocketOptionLevel.
Socket
)
2191
SocketError errorCode = GetSockOpt(handle, SocketOptionLevel.
Socket
, SocketOptionName.Error, out int optionValue);
System\Net\Sockets\TCPClient.cs (8)
308
get { return (int)Client.GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveBuffer)!; }
309
set { Client.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveBuffer, value); }
315
get { return (int)Client.GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendBuffer)!; }
316
set { Client.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendBuffer, value); }
325
return (int)Client.GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveTimeout)!;
330
Client.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.ReceiveTimeout, value);
340
return (int)Client.GetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendTimeout)!;
345
Client.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.SendTimeout, value);
System\Net\Sockets\UDPClient.cs (1)
262
_clientSocket.SetSocketOption(SocketOptionLevel.
Socket
, SocketOptionName.Broadcast, 1);