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