WebSocket.CreateFromStream Method (System.Net.WebSockets) (original) (raw)
Definition
Namespace:
Assemblies:
netstandard.dll, System.Net.WebSockets.dll
Assembly:
System.Net.WebSockets.dll
Assembly:
netstandard.dll
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateFromStream(Stream, WebSocketCreationOptions)
Source:
Source:
Source:
Source:
Source:
Creates a WebSocket that operates on a Stream representing a web socket connection.
public:
static System::Net::WebSockets::WebSocket ^ CreateFromStream(System::IO::Stream ^ stream, System::Net::WebSockets::WebSocketCreationOptions ^ options);public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, System.Net.WebSockets.WebSocketCreationOptions options);static member CreateFromStream : System.IO.Stream * System.Net.WebSockets.WebSocketCreationOptions -> System.Net.WebSockets.WebSocketPublic Shared Function CreateFromStream (stream As Stream, options As WebSocketCreationOptions) As WebSocketParameters
Returns
The created web socket.
Applies to
CreateFromStream(Stream, Boolean, String, TimeSpan)
Source:
Source:
Source:
Source:
Source:
Creates a new WebSocket object that operates on the specified stream, which represents a web socket connection.
public:
static System::Net::WebSockets::WebSocket ^ CreateFromStream(System::IO::Stream ^ stream, bool isServer, System::String ^ subProtocol, TimeSpan keepAliveInterval);public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, bool isServer, string? subProtocol, TimeSpan keepAliveInterval);public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, bool isServer, string subProtocol, TimeSpan keepAliveInterval);static member CreateFromStream : System.IO.Stream * bool * string * TimeSpan -> System.Net.WebSockets.WebSocketPublic Shared Function CreateFromStream (stream As Stream, isServer As Boolean, subProtocol As String, keepAliveInterval As TimeSpan) As WebSocketParameters
stream
The stream for the connection.
isServer
true to indicate it's the server-side of the connection; false if it's the client-side.
subProtocol
The agreed upon sub-protocol that was used when creating the connection.
Returns
The new web socket.