diff options
author | Stephen Toub <stoub@microsoft.com> | 2017-06-30 03:42:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-30 03:42:39 +0300 |
commit | 04a4db80a0d1a0d730a6041d2671572c4009a705 (patch) | |
tree | 565e70f0c7dd604fe20a460127b107929d41f82b /src/System.Net.WebSockets.Client | |
parent | cd7ae0572ed600eb7c0ae3350a6f08653fc20946 (diff) |
Move ManagedWebSocket from System.Net.WebSockets.Client to System.Net.WebSockets (#21713)
Diffstat (limited to 'src/System.Net.WebSockets.Client')
-rw-r--r-- | src/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj | 3 | ||||
-rw-r--r-- | src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj b/src/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj index 6111ebdb7c..33fb2a06a1 100644 --- a/src/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj +++ b/src/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj @@ -92,9 +92,6 @@ </ItemGroup> <ItemGroup Condition=" '$(TargetsUnix)' == 'true' "> <Compile Include="System\Net\WebSockets\WebSocketHandle.Managed.cs" /> - <Compile Include="$(CommonPath)\System\Net\WebSockets\ManagedWebSocket.cs"> - <Link>Common\System\Net\WebSockets\ManagedWebSocket.cs</Link> - </Compile> <Compile Include="$(CommonPath)\System\StringExtensions.cs"> <Link>Common\System\StringExtensions.cs</Link> </Compile> diff --git a/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs b/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs index abf01d1a71..17f0b8eedb 100644 --- a/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs +++ b/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs @@ -31,7 +31,7 @@ namespace System.Net.WebSockets private readonly CancellationTokenSource _abortSource = new CancellationTokenSource(); private WebSocketState _state = WebSocketState.Connecting; - private ManagedWebSocket _webSocket; + private WebSocket _webSocket; public static WebSocketHandle Create() => new WebSocketHandle(); @@ -109,8 +109,8 @@ namespace System.Net.WebSockets // Parse the response and store our state for the remainder of the connection string subprotocol = await ParseAndValidateConnectResponseAsync(stream, options, secKeyAndSecWebSocketAccept.Value, cancellationToken).ConfigureAwait(false); - _webSocket = ManagedWebSocket.CreateFromConnectedStream( - stream, false, subprotocol, options.KeepAliveInterval, options.ReceiveBufferSize, options.Buffer); + _webSocket = WebSocket.CreateClientWebSocket( + stream, subprotocol, options.ReceiveBufferSize, options.SendBufferSize, options.KeepAliveInterval, false, options.Buffer.GetValueOrDefault()); // If a concurrent Abort or Dispose came in before we set _webSocket, make sure to update it appropriately if (_state == WebSocketState.Aborted) |