WebSocket.CreateClientWebSocket Method (System.Net.WebSockets) (original) (raw)
Allows callers to create a client side WebSocket class which will use the WSPC for framing purposes.
This API supports the product infrastructure and is not intended to be used directly from your code.
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.WebSocketPublic 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 WebSocketParameters
innerStream
The connection to be used for IO operations.
subProtocol
The subprotocol accepted by the client.
receiveBufferSize
The size in bytes of the client WebSocket receive buffer.
sendBufferSize
The size in bytes of the client WebSocket send buffer.
keepAliveInterval
Determines how regularly a frame is sent over the connection as a keep-alive. Applies only when the connection is idle.
useZeroMaskingKey
Indicates whether a random key or a static key (just zeros) should be used for the WebSocket masking.
internalBuffer
Will be used as the internal buffer in the WPC. The size has to be at least 2 * ReceiveBufferSize + SendBufferSize + 256 + 20 (16 on 32-bit).
Returns
Returns WebSocket.