NativeWebSocketWrapper Class
An wrapper for NativeWebSocket to ensure it implements
The current state of the web socket client
Callback when web socket is opened
Action< byte[], int, int > OnMessage
Callback when message is received from web socket server
Callback when an error is received from web socket server
Callback when message is received from web socket server
NativeWebSocketWrapper ( string url,
Dictionary< string, string > headers )
Constructor that takes in url and headers and adds all callbacks.
Method to begin web socket communication
async Task Send ( byte [] data )
Method to send byte data to a web socket
Method to close web socket communication with normal close code