can send TEXT message (we only support BINARY messages now)

This commit is contained in:
Benjamin Sergeant
2019-03-22 14:22:58 -07:00
parent d41b7f64e4
commit f029321664
5 changed files with 49 additions and 11 deletions

View File

@ -46,9 +46,12 @@ webSocket.setOnMessageCallback(
// Now that our callback is setup, we can start our background thread and receive messages
webSocket.start();
// Send a message to the server
// Send a message to the server (default to BINARY mode)
webSocket.send("hello world");
// The message can be sent in TEXT mode
webSocket.sendText("hello again");
// ... finally ...
// Stop the connection