API reference
API reference
Select your platform
No SDKs available
No versions available

MockWebSocket Class

Mock web socket handler

Constructors

MockWebSocket ( autoOpen )
Signature
Meta.Voice.Net.WebSockets.MockWebSocket.MockWebSocket(bool autoOpen=false)
Parameters
autoOpen: bool

Properties

[Get][Set]
Signature
WitWebSocketConnectionState Meta.Voice.Net.WebSockets.MockWebSocket.State

Events

HandleClose : Action
Signature
Action Meta.Voice.Net.WebSockets.MockWebSocket.HandleClose
HandleConnect : Action
Signature
Action Meta.Voice.Net.WebSockets.MockWebSocket.HandleConnect
HandleSend : Action< byte[]>
Signature
Action<byte[]> Meta.Voice.Net.WebSockets.MockWebSocket.HandleSend
OnClose : Action< WebSocketCloseCode >
Signature
Action<WebSocketCloseCode> Meta.Voice.Net.WebSockets.MockWebSocket.OnClose
OnError : Action< string >
Signature
Action<string> Meta.Voice.Net.WebSockets.MockWebSocket.OnError
OnMessage : Action< byte[], int, int >
Signature
Action<byte[], int, int> Meta.Voice.Net.WebSockets.MockWebSocket.OnMessage
OnOpen : Action
Signature
Action Meta.Voice.Net.WebSockets.MockWebSocket.OnOpen

Methods

Close ()
Method to close web socket communication with normal close code
Signature
Task Meta.Voice.Net.WebSockets.MockWebSocket.Close()
Returns
Task
Connect ()
Method to begin web socket communication
Signature
async Task Meta.Voice.Net.WebSockets.MockWebSocket.Connect()
Returns
async Task
Send ( data )
Method to send byte data to a web socket
Signature
async Task Meta.Voice.Net.WebSockets.MockWebSocket.Send(byte[] data)
Parameters
data: byte []
Returns
async Task
SimulateError ( error )
Signature
void Meta.Voice.Net.WebSockets.MockWebSocket.SimulateError(string error)
Parameters
error: string
Returns
void
SimulateOpen ()
Signature
void Meta.Voice.Net.WebSockets.MockWebSocket.SimulateOpen()
Returns
void
SimulateResponse ( bytes , offset , length )
Signature
void Meta.Voice.Net.WebSockets.MockWebSocket.SimulateResponse(byte[] bytes, int offset, int length)
Parameters
bytes: byte []
offset: int
length: int
Returns
void
SimulateResponse ( jsonData , binaryData )
Signature
void Meta.Voice.Net.WebSockets.MockWebSocket.SimulateResponse(WitResponseNode jsonData, byte[] binaryData=null)
Parameters
jsonData: WitResponseNode
binaryData: byte []
Returns
void