121 references to SocketOptionLevel
System (105)
net\System\Net\_SafeNetHandles.cs (1)
2655
SocketOptionLevel
.Socket,
net\System\Net\ServicePoint.cs (3)
320
finalSocket.SetSocketOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay, 1);
323
finalSocket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ReceiveBuffer, ReceiveBufferSize);
1329
socket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ReuseUnicastPort, 0x1);
net\System\Net\Sockets\_AcceptOverlappedAsyncResult.cs (1)
84
SocketOptionLevel
.Socket,
net\System\Net\Sockets\_ConnectOverlappedAsyncResult.cs (1)
43
SocketOptionLevel
.Socket,
net\System\Net\Sockets\NetworkStream.cs (4)
258
int timeout = (int)m_StreamSocket.GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ReceiveTimeout);
290
int timeout = (int)m_StreamSocket.GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.SendTimeout);
1286
chkStreamSocket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.SendTimeout, timeout, silent);
1292
chkStreamSocket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ReceiveTimeout, timeout, silent);
net\System\Net\Sockets\Socket.cs (60)
626
return (int)GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ExclusiveAddressUse) != 0 ? true : false;
632
SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ExclusiveAddressUse, value ? 1 : 0);
639
return (int)GetSocketOption(
SocketOptionLevel
.Socket,
647
SetSocketOption(
SocketOptionLevel
.Socket,
654
return (int)GetSocketOption(
SocketOptionLevel
.Socket,
663
SetSocketOption(
SocketOptionLevel
.Socket,
670
return (int)GetSocketOption(
SocketOptionLevel
.Socket,
681
SetSocketOption(
SocketOptionLevel
.Socket,
688
return (int)GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.SendTimeout);
699
SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.SendTimeout, value);
705
return (LingerOption)GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Linger);
708
SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Linger, value);
714
return (int)GetSocketOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay) != 0 ? true : false;
717
SetSocketOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay, value ? 1 : 0);
724
return (short)(int)GetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.IpTimeToLive);
727
return (short)(int)GetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.IpTimeToLive);
742
SetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.IpTimeToLive, value);
746
SetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.IpTimeToLive, value);
757
return (int)GetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.DontFragment) != 0 ? true : false;
766
SetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.DontFragment, value ? 1 : 0);
777
return (int)GetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.MulticastLoopback) != 0 ? true : false;
780
return (int)GetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.MulticastLoopback) != 0 ? true : false;
789
SetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.MulticastLoopback, value ? 1 : 0);
793
SetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.MulticastLoopback, value ? 1 : 0);
804
return (int)GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Broadcast) != 0 ? true : false;
807
SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Broadcast, value ? 1 : 0);
816
return ((int)GetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.IPv6Only) == 0);
822
SetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.IPv6Only, value ? 0 : 1);
2285
SetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.IPProtectionLevel, (int)level);
2288
SetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.IPProtectionLevel, (int)level);
2300
public void SetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, int optionValue) {
2313
public void SetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, byte[] optionValue) {
2350
public void SetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, bool optionValue) {
2357
public void SetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, object optionValue) {
2372
if (optionLevel==
SocketOptionLevel
.Socket && optionName==SocketOptionName.Linger) {
2382
else if (optionLevel==
SocketOptionLevel
.IP && (optionName==SocketOptionName.AddMembership || optionName==SocketOptionName.DropMembership)) {
2392
else if (optionLevel==
SocketOptionLevel
.IPv6 && (optionName==SocketOptionName.AddMembership || optionName==SocketOptionName.DropMembership)) {
2411
public object GetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName) {
2415
if (optionLevel==
SocketOptionLevel
.Socket && optionName==SocketOptionName.Linger) {
2418
else if (optionLevel==
SocketOptionLevel
.IP && (optionName==SocketOptionName.AddMembership || optionName==SocketOptionName.DropMembership)) {
2424
else if (optionLevel==
SocketOptionLevel
.IPv6 && (optionName==SocketOptionName.AddMembership || optionName==SocketOptionName.DropMembership)) {
2462
public void GetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, byte[] optionValue) {
2497
public byte[] GetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, int optionLength) {
5828
private void CheckSetOptionPermissions(
SocketOptionLevel
optionLevel, SocketOptionName optionName) {
5830
if ( !(optionLevel ==
SocketOptionLevel
.Tcp &&
5835
!(optionLevel ==
SocketOptionLevel
.Udp &&
5839
!(optionLevel ==
SocketOptionLevel
.Socket &&
5850
!(optionLevel ==
SocketOptionLevel
.IPv6 &&
6334
SocketOptionLevel
.Socket,
6456
SetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.PacketInformation, true);
6462
SetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.PacketInformation, true);
6469
internal unsafe void SetSocketOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName, int optionValue, bool silent) {
6552
SocketOptionLevel
.IP,
6590
SocketOptionLevel
.IPv6,
6621
SocketOptionLevel
.Socket,
6649
SocketOptionLevel
.Socket,
6680
SocketOptionLevel
.IP,
6733
SocketOptionLevel
.IP,
9832
SocketOptionLevel
.Socket,
9868
SocketOptionLevel
.Socket,
net\System\Net\Sockets\TCPClient.cs (13)
517
return numericOption(
SocketOptionLevel
.Socket,
521
Client.SetSocketOption(
SocketOptionLevel
.Socket,
535
return numericOption(
SocketOptionLevel
.Socket,
540
Client.SetSocketOption(
SocketOptionLevel
.Socket,
552
return numericOption(
SocketOptionLevel
.Socket,
556
Client.SetSocketOption(
SocketOptionLevel
.Socket,
568
return numericOption(
SocketOptionLevel
.Socket, SocketOptionName.SendTimeout);
572
Client.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.SendTimeout, value);
583
return (LingerOption)Client.GetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Linger);
586
Client.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Linger, value);
597
return numericOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay) != 0 ? true : false;
600
Client.SetSocketOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay, value ? 1 : 0);
612
private int numericOption(
SocketOptionLevel
optionLevel, SocketOptionName optionName) {
net\System\Net\Sockets\UDPClient.cs (10)
497
Client.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Broadcast, 1);
817
SocketOptionLevel
.IP,
825
SocketOptionLevel
.IPv6,
848
SocketOptionLevel
.IP,
887
SocketOptionLevel
.IPv6,
920
(m_Family == AddressFamily.InterNetwork) ?
SocketOptionLevel
.IP :
SocketOptionLevel
.IPv6,
953
SocketOptionLevel
.IP,
961
SocketOptionLevel
.IPv6,
999
SocketOptionLevel
.IPv6,
net\System\Net\UnsafeNativeMethods.cs (12)
771
[In]
SocketOptionLevel
optionLevel,
1083
[In]
SocketOptionLevel
optionLevel,
1092
[In]
SocketOptionLevel
optionLevel,
1101
[In]
SocketOptionLevel
optionLevel,
1110
[In]
SocketOptionLevel
optionLevel,
1122
[In]
SocketOptionLevel
optionLevel,
1131
[In]
SocketOptionLevel
optionLevel,
1140
[In]
SocketOptionLevel
optionLevel,
1149
[In]
SocketOptionLevel
optionLevel,
1159
[In]
SocketOptionLevel
optionLevel,
1168
[In]
SocketOptionLevel
optionLevel,
1180
[In]
SocketOptionLevel
optionLevel,
System.Runtime.Remoting (9)
channels\core\exclusivetcplistener.cs (2)
42
base.Server.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ExclusiveAddressUse, 1);
55
Server.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ExclusiveAddressUse, 0);
channels\core\socketcache.cs (1)
98
socket.SetSocketOption(
SocketOptionLevel
.Tcp,
channels\http\httpserverchannel.cs (3)
464
socket.SetSocketOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay, 1);
466
socket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.KeepAlive, 1);
470
socket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Linger, lingerOption);
channels\tcp\tcpserverchannel.cs (3)
412
socket.SetSocketOption(
SocketOptionLevel
.Tcp, SocketOptionName.NoDelay, 1);
414
socket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.KeepAlive, 1);
418
socket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.Linger, lingerOption);
System.ServiceModel (1)
System\ServiceModel\Channels\SocketConnection.cs (1)
2109
this.listenSocket.SetSocketOption(
SocketOptionLevel
.IPv6, (SocketOptionName)23, 10);
System.ServiceModel.Channels (6)
System\ServiceModel\Channels\UdpUtility.cs (6)
449
SocketOptionLevel
ipOptionLevel = (isIPv4 ? ipOptionLevel =
SocketOptionLevel
.IP : ipOptionLevel =
SocketOptionLevel
.IPv6);
475
socket.SetSocketOption(
SocketOptionLevel
.Socket, SocketOptionName.ReuseAddress, 1);
501
socket.SetSocketOption(
SocketOptionLevel
.IPv6, SocketOptionName.AddMembership,
510
socket.SetSocketOption(
SocketOptionLevel
.IP, SocketOptionName.AddMembership,