System.Net.WebSockets.WebSocketProtocol 5.1.0

About

Provides the WebSocketProtocol class, which allows creating a WebSocket from a connected stream using WebSocketsProtocol.CreateFromConnectedStream.

NOTE: This package was designed as a temporary solution for internal use (building ASP.NET targeting .NET Standard 2.0), and is now considered obsolete. If targeting .NET Standard 2.1 or .NET 5+, use WebSocket.CreateFromStream instead.

Key Features

  • Creates a new WebSocket instance that operates on the specified transport stream. The WebSocket class allows applications to send and receive data after the WebSocket upgrade has completed.
  • The API can be used to create both client-side and server-side WebSocket instances.

How to Use

To create a WebSocket using WebSocketProtocol, as a prerequisite, you need to prepare the opaque transport stream for the WebSocket, for example, create or accept a TCP socket connection as a Stream and perform a WebSocket opening handshake (upgrade) over it. Then you can use the transport stream and the negotiated subprotocol to call WebSocketProtocol.CreateFromStream.

Stream opaqueTransport = /* ... */; // complete WebSocket opening handshake over the transport connection
WebSocket ws = WebSocketProtocol.CreateFromStream(opaqueTransport, isServer: true, subProtocol, keepAliveInterval);

Remarks

The API is considered obsolete and is not recommented for use.

On .NET Framework or .NET Standard 2.0:

On .NET Core 2.1+, .NET 5+ or .NET Standard 2.1:

Main Types

The main types provided by this library are:

  • System.Net.WebSockets.WebSocketProtocol

Additional Documentation

License

System.Net.WebSockets.WebSocketProtocol is released as open source under the MIT license.

Showing the top 20 packages that depend on System.Net.WebSockets.WebSocketProtocol.

Packages Downloads
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
18
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
43
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
46
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
16
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
20
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
22
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
24
Microsoft.AspNetCore.Http.Connections
Components for providing real-time bi-directional communication across the Web.
25
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers.
16
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers.
22
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers.
24
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers.
30
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers.
31
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers.
38
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers. This package was built from the source at: https://github.com/aspnet/WebSockets/tree/56f90124026b1da5f260b3c1a55f75fab7ecbb68
27
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers. This package was built from the source at: https://github.com/aspnet/WebSockets/tree/6d565e3a8a6ab74d27ce2e1bbc64e58ad242cd99
24
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers. This package was built from the source at: https://github.com/aspnet/WebSockets/tree/ecadd7b7b1378f8722b868335cca0161e935d2ff
19
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/0f9ad16b096ca2535d77efd2ad27645449421b44
29
Microsoft.AspNetCore.WebSockets
ASP.NET Core web socket middleware for use on top of opaque servers. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/ce8cf65589734f82b0536c543aba5bd60d0a5a98
24

Version Downloads Last updated
6.0.0-preview.1.21102.12 109 09/26/2022
5.1.0 2 11/26/2024
5.0.0 95 09/25/2022
5.0.0-rc.2.20475.5 81 09/23/2022
5.0.0-rc.1.20451.14 62 09/23/2022
5.0.0-preview.8.20407.11 80 09/22/2022
5.0.0-preview.7.20364.11 100 09/22/2022
5.0.0-preview.6.20305.6 42 09/23/2022
5.0.0-preview.5.20278.1 36 09/23/2022
5.0.0-preview.4.20251.6 39 09/22/2022
5.0.0-preview.3.20214.6 37 09/23/2022
5.0.0-preview.2.20160.6 57 09/22/2022
5.0.0-preview.1.20120.5 39 09/21/2022
4.7.1 113 09/22/2022
4.7.0 67 09/22/2022
4.7.0-preview3.19551.4 92 10/16/2022
4.7.0-preview2.19523.17 42 10/16/2022
4.7.0-preview1.19504.10 79 09/21/2022
4.6.0 55 09/21/2022
4.6.0-rc1.19456.4 60 09/23/2022
4.6.0-preview9.19421.4 58 09/22/2022
4.6.0-preview9.19416.11 39 09/22/2022
4.6.0-preview8.19405.3 32 09/22/2022
4.6.0-preview7.19362.9 66 09/24/2022
4.6.0-preview6.19303.8 69 09/25/2022
4.6.0-preview6.19264.9 38 09/25/2022
4.6.0-preview5.19224.8 72 09/23/2022
4.6.0-preview4.19212.13 52 09/22/2022
4.6.0-preview3.19128.7 54 09/23/2022
4.6.0-preview.19073.11 92 09/23/2022
4.6.0-preview.18571.3 64 09/21/2022
4.5.3 76 09/22/2022
4.5.2 45 09/25/2022
4.5.1 28 09/21/2022
4.5.0 73 09/23/2022
4.5.0-rc1 87 10/16/2022
4.5.0-preview2-26406-04 64 09/24/2022
4.5.0-preview1-26216-02 101 09/21/2022