Share via


WebSocket.CreateFromStream Metodo

Definizione

Overload

CreateFromStream(Stream, WebSocketCreationOptions)

Crea un oggetto WebSocket che opera su un Stream oggetto che rappresenta una connessione web socket.

CreateFromStream(Stream, Boolean, String, TimeSpan)

Crea un nuovo oggetto WebSocket che opera sul flusso specificato, che rappresenta una connessione Web Socket.

CreateFromStream(Stream, WebSocketCreationOptions)

Origine:
WebSocket.cs
Origine:
WebSocket.cs
Origine:
WebSocket.cs

Crea un oggetto WebSocket che opera su un Stream oggetto che rappresenta una connessione web socket.

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.WebSocket
Public Shared Function CreateFromStream (stream As Stream, options As WebSocketCreationOptions) As WebSocket

Parametri

stream
Stream

Proprietà Stream per la connessione.

options
WebSocketCreationOptions

Opzioni con cui è necessario creare il websocket.

Restituisce

Web socket creato.

Si applica a

CreateFromStream(Stream, Boolean, String, TimeSpan)

Origine:
WebSocket.cs
Origine:
WebSocket.cs
Origine:
WebSocket.cs

Crea un nuovo oggetto WebSocket che opera sul flusso specificato, che rappresenta una connessione Web Socket.

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.WebSocket
Public Shared Function CreateFromStream (stream As Stream, isServer As Boolean, subProtocol As String, keepAliveInterval As TimeSpan) As WebSocket

Parametri

stream
Stream

Flusso per la connessione.

isServer
Boolean

true per indicare che si tratta del lato server della connessione. false se è il lato client.

subProtocol
String

Il protocollo secondario concordato usato durante la creazione della connessione.

keepAliveInterval
TimeSpan

Intervallo keep-alive da usare o InfiniteTimeSpan per disabilitare i Keep-Alive.

Restituisce

Nuovo Web Socket.

Si applica a