Provides a fake websocket.
More...
|
override void | Abort () |
override Task | CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) |
override Task | CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) |
override void | Dispose () |
override Task< WebSocketReceiveResult > | ReceiveAsync (ArraySegment< byte > buffer, CancellationToken cancellationToken) |
override Task | SendAsync (ArraySegment< byte > buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) |
void | SetReceiveHandler (Func< ArraySegment< byte >, CancellationToken, Task< WebSocketReceiveResult > > handler) |
| Set the receive handler.
|
void | SetSendHandler (Func< ArraySegment< byte >, WebSocketMessageType, bool, CancellationToken, Task > handler) |
| Set the send handler.
|
void | SetSubProtocol (string subProtocol) |
| Set the sub-protocol.
|
|
override? WebSocketCloseStatus | CloseStatus [get] |
override string | CloseStatusDescription [get] |
override WebSocketState | State [get] |
override string | SubProtocol [get] |
Provides a fake websocket.
◆ SetReceiveHandler()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeWebSocket.SetReceiveHandler |
( |
Func< ArraySegment< byte >, CancellationToken, Task< WebSocketReceiveResult > > | handler | ) |
|
Set the receive handler.
- Parameters
-
◆ SetSendHandler()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeWebSocket.SetSendHandler |
( |
Func< ArraySegment< byte >, WebSocketMessageType, bool, CancellationToken, Task > | handler | ) |
|
Set the send handler.
- Parameters
-
◆ SetSubProtocol()
void PeanutButter.TestUtils.AspNetCore.Fakes.FakeWebSocket.SetSubProtocol |
( |
string | subProtocol | ) |
|
Set the sub-protocol.
- Parameters
-
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.AspNetCore/Fakes/FakeWebSocket.cs