Свойство | Тип | Описание | |
---|---|---|---|
ApplyMask | int | ||
ApplyMask | int | ||
CloseAsyncPrivate | Task | ||
CloseWithReceiveErrorAndThrowAsync | Task | ||
CombineMaskBytes | int | ||
ConsumeFromBuffer | void | ||
CreateOperationCanceledException | Exception | ||
DisposeCore | void | ||
EnsureBufferContainsAsync | Task | ||
EnsureBufferLength | void | ||
HandleReceivedCloseAsync | Task |
||
HandleReceivedPingPongAsync | Task | ||
IsValidCloseStatus | bool | ||
ManagedWebSocket | System.Diagnostics | ||
ReceiveAsyncPrivate | Task |
||
SendCloseFrameAsync | Task | ||
SendFrameAsync | Task | ||
SendFrameFallbackAsync | Task | ||
SendFrameLockAcquiredNonCancelableAsync | Task | ||
SendKeepAliveFrameAsync | void | ||
ThrowIfOperationInProgress | void | ||
TryParseMessageHeaderFromReceiveBuffer | bool | ||
TryValidateUtf8 | bool | ||
WriteFrameToSendBuffer | int | ||
WriteHeader | int | ||
WriteRandomMask | void |
Метод | Описание | |
---|---|---|
Abort ( ) : void | ||
CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, |
||
CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, |
||
CreateFromConnectedStream ( |
Creates a ManagedWebSocket from a Stream connected to a websocket endpoint.
|
|
Dispose ( ) : void | ||
ReceiveAsync ( ArraySegment |
||
SendAsync ( ArraySegment |
Метод | Описание | |
---|---|---|
ApplyMask ( byte toMask, int toMaskOffset, byte mask, int maskOffset, int maskOffsetIndex, long count ) : int |
Applies a mask to a portion of a byte array.
|
|
ApplyMask ( byte toMask, int toMaskOffset, int mask, int maskIndex, long count ) : int |
Applies a mask to a portion of a byte array.
|
|
CloseAsyncPrivate ( WebSocketCloseStatus closeStatus, string statusDescription, |
Send a close message, then receive until we get a close response message.
|
|
CloseWithReceiveErrorAndThrowAsync ( WebSocketCloseStatus closeStatus, WebSocketError error, |
Send a close message to the server and throw an exception, in response to getting bad data from the server.
|
|
CombineMaskBytes ( byte buffer, int maskOffset ) : int | ||
ConsumeFromBuffer ( int count ) : void | ||
CreateOperationCanceledException ( Exception innerException, |
Creates an OperationCanceledException instance, using a default message and the specified inner exception and token.
|
|
DisposeCore ( ) : void | ||
EnsureBufferContainsAsync ( int minimumRequiredBytes, |
||
EnsureBufferLength ( byte &buffer, int minLength ) : void |
Grows the specified buffer if it's not at least the specified minimum length. Data is not copied if the buffer is grown.
|
|
HandleReceivedCloseAsync ( MessageHeader header, |
Processes a received close message.
|
|
HandleReceivedPingPongAsync ( MessageHeader header, |
Processes a received ping or pong message.
|
|
IsValidCloseStatus ( WebSocketCloseStatus closeStatus ) : bool |
Check whether a close status is valid according to the RFC.
|
|
ManagedWebSocket ( |
Initializes the websocket.
|
|
ReceiveAsyncPrivate ( ArraySegment |
Receive the next text, binary, continuation, or close message, returning information about it and writing its payload into the supplied buffer. Other control messages may be consumed and processed as part of this operation, but data about them will not be returned.
|
|
SendCloseFrameAsync ( WebSocketCloseStatus closeStatus, string closeStatusDescription, |
Sends a close message to the server.
|
|
SendFrameAsync ( MessageOpcode opcode, bool endOfMessage, ArraySegment |
Sends a websocket frame to the network.
|
|
SendFrameFallbackAsync ( MessageOpcode opcode, bool endOfMessage, ArraySegment |
||
SendFrameLockAcquiredNonCancelableAsync ( MessageOpcode opcode, bool endOfMessage, ArraySegment |
Sends a websocket frame to the network. The caller must hold the sending lock.
|
|
SendKeepAliveFrameAsync ( ) : void | ||
ThrowIfOperationInProgress ( Task operationTask, [ methodName = null ) : void |
Aborts the websocket and throws an exception if an existing operation is in progress.
|
|
TryParseMessageHeaderFromReceiveBuffer ( MessageHeader &resultHeader ) : bool |
Parses a message header from the buffer. This assumes the header is in the buffer.
|
|
TryValidateUtf8 ( ArraySegment |
||
WriteFrameToSendBuffer ( MessageOpcode opcode, bool endOfMessage, ArraySegment |
Writes a frame into the send buffer, which can then be sent over the network.
|
|
WriteHeader ( MessageOpcode opcode, byte sendBuffer, ArraySegment |
||
WriteRandomMask ( byte buffer, int offset ) : void |
Writes a 4-byte random mask to the specified buffer at the specified offset.
|
public CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, |
||
closeStatus | WebSocketCloseStatus | |
statusDescription | string | |
cancellationToken | ||
Результат | Task |
public CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, |
||
closeStatus | WebSocketCloseStatus | |
statusDescription | string | |
cancellationToken | ||
Результат | Task |
public static CreateFromConnectedStream ( |
||
stream | The connected Stream. | |
isServer | bool | true if this is the server-side of the connection; false if this is the client-side of the connection. |
subprotocol | string | The agreed upon subprotocol for the connection. |
keepAliveInterval | TimeSpan | The interval to use for keep-alive pings. |
receiveBufferSize | int | The buffer size to use for received data. |
receiveBuffer | ArraySegment |
Optional buffer to use for receives. |
Результат |
public ReceiveAsync ( ArraySegment |
||
buffer | ArraySegment |
|
cancellationToken | ||
Результат | Task |
public SendAsync ( ArraySegment |
||
buffer | ArraySegment |
|
messageType | WebSocketMessageType | |
endOfMessage | bool | |
cancellationToken | ||
Результат | Task |