Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == 'browser' or '$(TargetPlatformIdentifier)' == ''">SR.SystemNetSockets_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
<IsApplePlatform Condition="'$(TargetPlatformIdentifier)' == 'osx' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos'">true</IsApplePlatform>
<DefineConstants Condition="'$(IsApplePlatform)' == 'true'">$(DefineConstants);SYSTEM_NET_SOCKETS_APPLE_PLATFROM</DefineConstants>
<DefineConstants Condition="'$(IsApplePlatform)' == 'true'">$(DefineConstants);SYSTEM_NET_SOCKETS_APPLE_PLATFORM</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'browser'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private enum Flags : byte
PreferInlineCompletions = 16,
IsSocket = 32,
IsDisconnected = 64,
#if SYSTEM_NET_SOCKETS_APPLE_PLATFROM
#if SYSTEM_NET_SOCKETS_APPLE_PLATFORM
TfoEnabled = 128
#endif
}
Expand Down Expand Up @@ -70,7 +70,7 @@ internal bool IsSocket
set => SetFlag(Flags.IsSocket, value);
}

#if SYSTEM_NET_SOCKETS_APPLE_PLATFROM
#if SYSTEM_NET_SOCKETS_APPLE_PLATFORM
internal bool TfoEnabled
{
get => (_flags & Flags.TfoEnabled) != 0;
Expand Down Expand Up @@ -98,7 +98,7 @@ internal void TransferTrackedState(SafeSocketHandle target)
target.DualMode = DualMode;
target.ExposedHandleOrUntrackedConfiguration = ExposedHandleOrUntrackedConfiguration;
target.IsSocket = IsSocket;
#if SYSTEM_NET_SOCKETS_APPLE_PLATFROM
#if SYSTEM_NET_SOCKETS_APPLE_PLATFORM
target.TfoEnabled = TfoEnabled;
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ public SocketError ConnectAsync(Memory<byte> socketAddress, Action<int, Memory<b
SocketError errorCode;
int observedSequenceNumber;
_sendQueue.IsReady(this, out observedSequenceNumber);
#if SYSTEM_NET_SOCKETS_APPLE_PLATFROM
#if SYSTEM_NET_SOCKETS_APPLE_PLATFORM
if (SocketPal.TryStartConnect(_socket, socketAddress, out errorCode, buffer.Span, _socket.TfoEnabled, out sentBytes))
#else
if (SocketPal.TryStartConnect(_socket, socketAddress, out errorCode, buffer.Span, false, out sentBytes)) // In Linux, we can figure it out as needed inside PAL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ public static unsafe SocketError SetSockOpt(SafeSocketHandle handle, SocketOptio
}
}

#if SYSTEM_NET_SOCKETS_APPLE_PLATFROM
#if SYSTEM_NET_SOCKETS_APPLE_PLATFORM
// macOS fails to even query it if socket is not actively listening.
// To provide consistent platform experience we will track if
// it was ret and we will use it later as needed.
Expand Down Expand Up @@ -1625,7 +1625,7 @@ public static unsafe SocketError GetSockOpt(SafeSocketHandle handle, SocketOptio
int optLen = sizeof(int);
Interop.Error err = Interop.Sys.GetSockOpt(handle, optionLevel, optionName, (byte*)&value, &optLen);

#if SYSTEM_NET_SOCKETS_APPLE_PLATFROM
#if SYSTEM_NET_SOCKETS_APPLE_PLATFORM
// macOS fails to even query it if socket is not actively listening.
// To provide consistent platform experience we will track if
// it was set and we will use it later as needed.
Expand Down
Loading