6 writes to _handle
System.Net.Sockets (6)
System\Net\Sockets\Socket.cs (3)
86
SocketError errorCode = SocketPal.CreateSocket(addressFamily, socketType, protocolType, out
_handle
);
121
_handle
= handle;
231
_handle
= null!;
System\Net\Sockets\Socket.Unix.cs (3)
155
Volatile.Write(ref
_handle
, newHandle);
270
_handle
= null!;
278
_handle
= source._handle;
95 references to _handle
System.Net.Sockets (95)
System\Net\Sockets\Socket.cs (61)
89
Debug.Assert(
_handle
.IsInvalid);
95
Debug.Assert(!
_handle
.IsInvalid);
279
SocketError errorCode = SocketPal.GetAvailable(
_handle
, out argp);
317
SocketError errorCode = SocketPal.GetSockName(
_handle
, ptr, &size);
361
_handle
,
397
_handle
.SetExposed();
398
return
_handle
;
402
internal SafeSocketHandle InternalSafeHandle =>
_handle
; // returns _handle without calling SetExposed.
812
_handle
,
1018
SocketError errorCode = SocketPal.Listen(
_handle
, backlog);
1064
_handle
,
1155
errorCode = SocketPal.Send(
_handle
, buffers, socketFlags, out bytesTransferred);
1202
errorCode = SocketPal.Send(
_handle
, buffer, offset, size, socketFlags, out bytesTransferred);
1249
errorCode = SocketPal.Send(
_handle
, buffer, socketFlags, out bytesTransferred);
1358
SocketError errorCode = SocketPal.SendTo(
_handle
, buffer, offset, size, socketFlags, socketAddress.Buffer.Slice(0, socketAddress.Size), out bytesTransferred);
1440
SocketError errorCode = SocketPal.SendTo(
_handle
, buffer, socketFlags, socketAddress.Buffer.Slice(0, socketAddress.Size), out bytesTransferred);
1481
SocketError errorCode = SocketPal.SendTo(
_handle
, buffer, socketFlags, socketAddress.Buffer.Slice(0, socketAddress.Size), out bytesTransferred);
1545
errorCode = SocketPal.Receive(
_handle
, buffer, offset, size, socketFlags, out bytesTransferred);
1587
errorCode = SocketPal.Receive(
_handle
, buffer, socketFlags, out bytesTransferred);
1643
errorCode = SocketPal.Receive(
_handle
, buffers, socketFlags, out bytesTransferred);
1686
SocketError errorCode = SocketPal.ReceiveMessageFrom(this,
_handle
, buffer, offset, size, ref socketFlags, socketAddress, out receiveAddress, out ipPacketInformation, out bytesTransferred);
1773
SocketError errorCode = SocketPal.ReceiveMessageFrom(this,
_handle
, buffer, ref socketFlags, socketAddress, out receiveAddress, out ipPacketInformation, out bytesTransferred);
1828
SocketError errorCode = SocketPal.ReceiveFrom(
_handle
, buffer, offset, size, socketFlags, socketAddress.Buffer, out int socketAddressLength, out bytesTransferred);
1952
SocketError errorCode = SocketPal.ReceiveFrom(
_handle
, buffer, socketFlags, socketAddress.Buffer, out int socketAddressLength, out bytesTransferred);
2030
SocketError errorCode = SocketPal.ReceiveFrom(
_handle
, buffer, socketFlags, receivedAddress.Buffer, out int socketAddressSize, out bytesTransferred);
2061
SocketError errorCode = SocketPal.WindowsIoctl(
_handle
, ioControlCode, optionInValue, optionOutValue, out realOptionLength);
2095
SocketError errorCode = SocketPal.SetSockOpt(
_handle
, optionLevel, optionName, optionValue);
2173
SocketError errorCode = SocketPal.SetRawSockOpt(
_handle
, optionLevel, optionName, optionValue);
2205
_handle
,
2229
_handle
,
2253
_handle
,
2294
SocketError errorCode = SocketPal.GetRawSockOpt(
_handle
, optionLevel, optionName, optionValue, ref realOptionLength);
2350
SocketError errorCode = SocketPal.Poll(
_handle
, microSeconds, mode, out status);
2474
errorCode = SocketPal.Disconnect(this,
_handle
, reuseSocket);
2815
SocketError errorCode = SocketPal.Shutdown(
_handle
, _isConnected, _isDisconnected, how);
2865
socketError = e.DoOperationAccept(this,
_handle
, acceptHandle, cancellationToken);
2965
e.DoOperationConnectEx(this,
_handle
) :
2966
e.DoOperationConnect(
_handle
); // For connectionless protocols, Connect is not an I/O call.
3050
socketError = e.DoOperationDisconnect(this,
_handle
, cancellationToken);
3075
socketError = e.DoOperationReceive(
_handle
, cancellationToken);
3131
socketError = e.DoOperationReceiveFrom(
_handle
, cancellationToken);
3179
socketError = e.DoOperationReceiveMessageFrom(this,
_handle
, cancellationToken);
3204
socketError = e.DoOperationSend(
_handle
, cancellationToken);
3237
socketError = e.DoOperationSendPackets(this,
_handle
, cancellationToken);
3286
socketError = e.DoOperationSendTo(
_handle
, cancellationToken);
3357
errorCode = SocketPal.Connect(
_handle
, socketAddress.Buffer.Slice(0, socketAddress.Size));
3409
SafeSocketHandle? handle =
_handle
;
3547
if (Disposed ||
_handle
.IsInvalid)
3554
SocketPal.Shutdown(
_handle
, _isConnected, _isDisconnected, how);
3604
if (silent && (Disposed ||
_handle
.IsInvalid))
3612
errorCode = SocketPal.SetSockOpt(
_handle
, optionLevel, optionName, optionValue);
3617
if (silent &&
_handle
.IsInvalid)
3645
SocketError errorCode = SocketPal.SetMulticastOption(
_handle
, optionName, MR);
3659
SocketError errorCode = SocketPal.SetIPv6MulticastOption(
_handle
, optionName, MR);
3674
SocketError errorCode = SocketPal.SetLingerOption(
_handle
, lref);
3690
SocketError errorCode = SocketPal.GetLingerOption(
_handle
, out lingerOption);
3706
SocketError errorCode = SocketPal.GetMulticastOption(
_handle
, optionName, out multicastOption);
3723
SocketError errorCode = SocketPal.GetIPv6MulticastOption(
_handle
, optionName, out multicastOption);
3751
errorCode = SocketPal.SetBlocking(
_handle
, desired, out willBlock);
3931
if (disconnectOnFailure && _isConnected && (
_handle
.IsInvalid || (errorCode != SocketError.WouldBlock &&
4079
if (_nonBlockingConnectInProgress && SocketPal.HasNonBlockingConnectCompleted(
_handle
, out bool success))
System\Net\Sockets\Socket.Unix.cs (34)
36
get =>
_handle
.PreferInlineCompletions;
37
set =>
_handle
.PreferInlineCompletions = value;
50
if (
_handle
.ExposedHandleOrUntrackedConfiguration && (isMultiEndpoint ||
_handle
.LastConnectFailed))
58
Debug.Assert(!
_handle
.LastConnectFailed);
117
if (!
_handle
.LastConnectFailed)
128
_handle
.LastConnectFailed = false;
142
if (
_handle
.IsTrackedOption(TrackedSocketOptions.DontFragment)) dontFragment = DontFragment;
143
if (
_handle
.IsTrackedOption(TrackedSocketOptions.EnableBroadcast)) broadcast = EnableBroadcast;
144
if (
_handle
.IsTrackedOption(TrackedSocketOptions.LingerState)) linger = LingerState;
145
if (
_handle
.IsTrackedOption(TrackedSocketOptions.NoDelay)) noDelay = NoDelay;
146
if (
_handle
.IsTrackedOption(TrackedSocketOptions.ReceiveBufferSize)) receiveSize = ReceiveBufferSize;
147
if (
_handle
.IsTrackedOption(TrackedSocketOptions.ReceiveTimeout)) receiveTimeout = ReceiveTimeout;
148
if (
_handle
.IsTrackedOption(TrackedSocketOptions.SendBufferSize)) sendSize = SendBufferSize;
149
if (
_handle
.IsTrackedOption(TrackedSocketOptions.SendTimeout)) sendTimeout = SendTimeout;
150
if (
_handle
.IsTrackedOption(TrackedSocketOptions.Ttl)) ttl = Ttl;
153
SafeSocketHandle oldHandle =
_handle
;
156
oldHandle.TransferTrackedState(
_handle
);
166
_handle
.Dispose();
173
if (
_handle
.IsTrackedOption(TrackedSocketOptions.DualMode)) DualMode =
_handle
.DualMode;
174
if (
_handle
.IsTrackedOption(TrackedSocketOptions.DontFragment)) DontFragment = dontFragment;
175
if (
_handle
.IsTrackedOption(TrackedSocketOptions.EnableBroadcast)) EnableBroadcast = broadcast;
176
if (
_handle
.IsTrackedOption(TrackedSocketOptions.LingerState)) LingerState = linger!;
177
if (
_handle
.IsTrackedOption(TrackedSocketOptions.NoDelay)) NoDelay = noDelay;
178
if (
_handle
.IsTrackedOption(TrackedSocketOptions.ReceiveBufferSize)) ReceiveBufferSize = receiveSize;
179
if (
_handle
.IsTrackedOption(TrackedSocketOptions.ReceiveTimeout)) ReceiveTimeout = receiveTimeout;
180
if (
_handle
.IsTrackedOption(TrackedSocketOptions.SendBufferSize)) SendBufferSize = sendSize;
181
if (
_handle
.IsTrackedOption(TrackedSocketOptions.SendTimeout)) SendTimeout = sendTimeout;
182
if (
_handle
.IsTrackedOption(TrackedSocketOptions.Ttl)) Ttl = ttl;
197
if (acceptSocket.
_handle
.HasShutdownSend)
244
errorCode = SocketPal.SendFile(
_handle
, fileHandle);
265
_handle
.Dispose();
278
_handle = source.
_handle
;