103 references to SocketPal
System.Net.Sockets (103)
System\Net\Sockets\SafeSocketHandle.Unix.cs (7)
232
return
SocketPal
.GetSocketErrorForErrorCode(CloseHandle(handle));
237
return
SocketPal
.GetSocketErrorForErrorCode(CloseHandle(handle));
251
return
SocketPal
.GetSocketErrorForErrorCode(errorCode);
259
return
SocketPal
.GetSocketErrorForErrorCode(CloseHandle(handle));
274
_closeSocketLinger =
SocketPal
.GetSocketErrorForErrorCode(errorCode);
290
return
SocketPal
.GetSocketErrorForErrorCode(errorCode);
320
_closeSocketResult =
SocketPal
.GetSocketErrorForErrorCode(errorCode);
System\Net\Sockets\Socket.cs (58)
86
SocketError errorCode =
SocketPal
.CreateSocket(addressFamily, socketType, protocolType, out _handle);
139
Debug.Assert(
SocketPal
.MaximumAddressSize <= 512);
141
Span<byte> buffer = stackalloc byte[
SocketPal
.MaximumAddressSize];
145
if (
SocketPal
.GetSockName(handle, bufferPtr, &bufferLength) != SocketError.Success)
186
switch (
SocketPal
.GetPeerName(handle, buffer, ref bufferLength))
279
SocketError errorCode =
SocketPal
.GetAvailable(_handle, out argp);
317
SocketError errorCode =
SocketPal
.GetSockName(_handle, ptr, &size);
360
SocketError errorCode =
SocketPal
.GetPeerName(
811
SocketError errorCode =
SocketPal
.Bind(
1018
SocketError errorCode =
SocketPal
.Listen(_handle, backlog);
1063
errorCode =
SocketPal
.Accept(
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);
1673
SocketPal
.CheckDualModePacketInfoSupport(this);
1686
SocketError errorCode =
SocketPal
.ReceiveMessageFrom(this, _handle, buffer, offset, size, ref socketFlags, socketAddress, out receiveAddress, out ipPacketInformation, out bytesTransferred);
1760
SocketPal
.CheckDualModePacketInfoSupport(this);
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);
2204
SocketError errorCode =
SocketPal
.GetSockOpt(
2228
SocketError errorCode =
SocketPal
.GetSockOpt(
2252
SocketError errorCode =
SocketPal
.GetSockOpt(
2294
SocketError errorCode =
SocketPal
.GetRawSockOpt(_handle, optionLevel, optionName, optionValue, ref realOptionLength);
2316
SocketPal
.SetIPProtectionLevel(this, SocketOptionLevel.IPv6, (int)level);
2320
SocketPal
.SetIPProtectionLevel(this, SocketOptionLevel.IP, (int)level);
2350
SocketError errorCode =
SocketPal
.Poll(_handle, microSeconds, mode, out status);
2414
SocketError errorCode =
SocketPal
.Select(checkRead, checkWrite, checkError, microSeconds);
2474
errorCode =
SocketPal
.Disconnect(this, _handle, reuseSocket);
2815
SocketError errorCode =
SocketPal
.Shutdown(_handle, _isConnected, _isDisconnected, how);
3160
SocketPal
.CheckDualModePacketInfoSupport(this);
3357
errorCode =
SocketPal
.Connect(_handle, socketAddress.Buffer.Slice(0, socketAddress.Size));
3441
errorCode =
SocketPal
.SetBlocking(handle, false, out willBlock);
3454
errorCode =
SocketPal
.Shutdown(handle, _isConnected, _isDisconnected, SocketShutdown.Send);
3458
errorCode =
SocketPal
.SetSockOpt(
3472
errorCode =
SocketPal
.Receive(handle, Array.Empty<byte>(), 0, 0, SocketFlags.None, out unused);
3484
errorCode =
SocketPal
.GetAvailable(handle, out dataAvailable);
3554
SocketPal
.Shutdown(_handle, _isConnected, _isDisconnected, how);
3579
SocketPal
.SetReceivingDualModeIPv4PacketInformation(this);
3612
errorCode =
SocketPal
.SetSockOpt(_handle, optionLevel, optionName, optionValue);
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);
4079
if (_nonBlockingConnectInProgress &&
SocketPal
.HasNonBlockingConnectCompleted(_handle, out bool success))
System\Net\Sockets\Socket.Unix.cs (2)
154
SocketError errorCode =
SocketPal
.CreateSocket(_addressFamily, _socketType, _protocolType, out SafeSocketHandle newHandle);
244
errorCode =
SocketPal
.SendFile(_handle, fileHandle);
System\Net\Sockets\SocketAsyncContext.Unix.cs (33)
374
return
SocketPal
.TryCompleteSendTo(context._socket, Buffer.Span, null, ref bufferIndex, ref Offset, ref Count, Flags, SocketAddress.Span, ref BytesTransferred, out ErrorCode);
402
return
SocketPal
.TryCompleteSendTo(context._socket, default(ReadOnlySpan<byte>), Buffers, ref BufferIndex, ref Offset, ref Count, Flags, SocketAddress.Span, ref BytesTransferred, out ErrorCode);
431
return
SocketPal
.TryCompleteSendTo(context._socket, new ReadOnlySpan<byte>(BufferPtr, bufferLength), null, ref bufferIndex, ref Offset, ref Count, Flags, SocketAddress.Span, ref BytesTransferred, out ErrorCode);
474
return
SocketPal
.TryCompleteReceive(context._socket, Buffer.Span, Flags, out BytesTransferred, out ErrorCode);
478
bool completed =
SocketPal
.TryCompleteReceiveFrom(context._socket, Buffer.Span, null, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
513
bool completed =
SocketPal
.TryCompleteReceiveFrom(context._socket, default(Span<byte>), Buffers, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
547
bool completed =
SocketPal
.TryCompleteReceiveFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode);
574
bool completed =
SocketPal
.TryCompleteReceiveMessageFrom(context._socket, Buffer.Span, Buffers, Flags, SocketAddress, out int socketAddressLen, IsIPv4, IsIPv6, out BytesTransferred, out ReceivedFlags, out IPPacketInformation, out ErrorCode);
604
bool completed =
SocketPal
.TryCompleteReceiveMessageFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress!, out int socketAddressLen, IsIPv4, IsIPv6, out BytesTransferred, out ReceivedFlags, out IPPacketInformation, out ErrorCode);
626
bool completed =
SocketPal
.TryCompleteAccept(context._socket, SocketAddress, out int socketAddressLen, out AcceptedFileDescriptor, out ErrorCode);
657
bool result =
SocketPal
.TryCompleteConnect(context._socket, out ErrorCode);
704
SocketPal
.TryCompleteSendFile(context._socket, FileHandle, ref Offset, ref Count, ref BytesTransferred, out ErrorCode);
1363
throw new SocketException((int)
SocketPal
.GetSocketErrorForErrorCode(Interop.Sys.GetLastError()));
1456
SocketPal
.TryCompleteAccept(_socket, socketAddress, out socketAddressLen, out acceptedFd, out errorCode))
1484
SocketPal
.TryCompleteAccept(_socket, socketAddress, out socketAddressLen, out acceptedFd, out errorCode))
1522
if (
SocketPal
.TryStartConnect(_socket, socketAddress, out errorCode) ||
1555
if (
SocketPal
.TryStartConnect(_socket, socketAddress, out errorCode, buffer.Span, false, out sentBytes)) // In Linux, we can figure it out as needed inside PAL.
1614
(
SocketPal
.TryCompleteReceiveFrom(_socket, buffer.Span, flags, socketAddress.Span, out socketAddressLen, out bytesReceived, out receivedFlags, out errorCode) ||
1645
(
SocketPal
.TryCompleteReceiveFrom(_socket, buffer, flags, socketAddress.Span, out socketAddressLen, out bytesReceived, out receivedFlags, out errorCode) ||
1678
SocketPal
.TryCompleteReceive(_socket, buffer.Span, flags, out bytesReceived, out errorCode))
1710
SocketPal
.TryCompleteReceiveFrom(_socket, buffer.Span, flags, socketAddress.Span, out socketAddressLen, out bytesReceived, out receivedFlags, out errorCode))
1759
(
SocketPal
.TryCompleteReceiveFrom(_socket, buffers, flags, socketAddress.Span, out socketAddressLen, out bytesReceived, out receivedFlags, out errorCode) ||
1788
SocketPal
.TryCompleteReceiveFrom(_socket, buffers, flags, socketAddress.Span, out socketAddressLen, out bytesReceived, out receivedFlags, out errorCode))
1828
(
SocketPal
.TryCompleteReceiveMessageFrom(_socket, buffer.Span, null, flags, socketAddress, out socketAddressLen, isIPv4, isIPv6, out bytesReceived, out receivedFlags, out ipPacketInformation, out errorCode) ||
1865
(
SocketPal
.TryCompleteReceiveMessageFrom(_socket, buffer, null, flags, socketAddress, out socketAddressLen, isIPv4, isIPv6, out bytesReceived, out receivedFlags, out ipPacketInformation, out errorCode) ||
1901
SocketPal
.TryCompleteReceiveMessageFrom(_socket, buffer.Span, buffers, flags, socketAddress, out socketAddressLen, isIPv4, isIPv6, out bytesReceived, out receivedFlags, out ipPacketInformation, out errorCode))
1957
(
SocketPal
.TryCompleteSendTo(_socket, buffer, ref offset, ref count, flags, socketAddress.Span, ref bytesSent, out errorCode) ||
1990
(
SocketPal
.TryCompleteSendTo(_socket, buffer, null, ref bufferIndexIgnored, ref offset, ref count, flags, socketAddress.Span, ref bytesSent, out errorCode) ||
2022
SocketPal
.TryCompleteSendTo(_socket, buffer.Span, ref offset, ref count, flags, socketAddress.Span, ref bytesSent, out errorCode))
2070
(
SocketPal
.TryCompleteSendTo(_socket, buffers, ref bufferIndex, ref offset, flags, socketAddress.Span, ref bytesSent, out errorCode) ||
2102
SocketPal
.TryCompleteSendTo(_socket, buffers, ref bufferIndex, ref offset, flags, socketAddress.Span, ref bytesSent, out errorCode))
2138
(
SocketPal
.TryCompleteSendFile(_socket, fileHandle, ref offset, ref count, ref bytesSent, out errorCode) ||
2166
SocketPal
.TryCompleteSendFile(_socket, fileHandle, ref offset, ref count, ref bytesSent, out errorCode))
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (3)
96
SocketError socketError =
SocketPal
.Disconnect(socket, handle, _disconnectReuseSocket);
288
_ =
SocketPal
.SendPacketsAsync(socket, SendPacketsFlags, elements, fileHandles, cancellationToken, (bytesTransferred, error) =>
352
SocketPal
.CreateSocket(_acceptedFileDescriptor),