WebSocket.CreateClientWebSocket Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Consente ai chiamanti di creare una classe WebSocket sul lato client che userà WSPC a scopo di frame.
Questa API supporta l'infrastruttura del prodotto e non è previsto che venga usata direttamente dal codice.
public:
static System::Net::WebSockets::WebSocket ^ CreateClientWebSocket(System::IO::Stream ^ innerStream, System::String ^ subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval, bool useZeroMaskingKey, ArraySegment<System::Byte> internalBuffer);
public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string? subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval, bool useZeroMaskingKey, ArraySegment<byte> internalBuffer);
public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval, bool useZeroMaskingKey, ArraySegment<byte> internalBuffer);
static member CreateClientWebSocket : System.IO.Stream * string * int * int * TimeSpan * bool * ArraySegment<byte> -> System.Net.WebSockets.WebSocket
Public Shared Function CreateClientWebSocket (innerStream As Stream, subProtocol As String, receiveBufferSize As Integer, sendBufferSize As Integer, keepAliveInterval As TimeSpan, useZeroMaskingKey As Boolean, internalBuffer As ArraySegment(Of Byte)) As WebSocket
Parametri
- innerStream
- Stream
Connessione da usare per le operazioni di I/O.
- subProtocol
- String
Sottoprotocolo accettato dal client.
- receiveBufferSize
- Int32
Dimensione in byte del buffer di ricezione webSocket del client.
- sendBufferSize
- Int32
Dimensioni in byte del buffer di invio WebSocket client.
- keepAliveInterval
- TimeSpan
Determina la frequenza con cui un frame viene inviato tramite la connessione come keep-alive. Si applica solo quando la connessione è inattiva.
- useZeroMaskingKey
- Boolean
Indica se per la maschera WebSocket deve essere usata una chiave casuale o una chiave statica (solo zeri).
- internalBuffer
- ArraySegment<Byte>
Verrà usato come buffer interno nel WPC. Le dimensioni devono essere almeno 2 * ReceiveBufferSize + SendBufferSize + 256 + 20 (16 on 32-bit).
Valori restituiti
Restituisce WebSocket.