Adding close() method. It abruptly closes the socket (does not bother to send a

CLOSE message prior to actually closing the socket).
This commit is contained in:
David Baird
2013-04-27 23:26:19 -06:00
parent f75e79b1ff
commit f7d998481c
3 changed files with 16 additions and 5 deletions
+4
View File
@@ -50,6 +50,10 @@ void dispatch(Callable callable);
// Sends a TEXT type message (gets put into a buffer for poll() to send
// later):
void send(std::string message);
// Close the WebSocket (N.B. - this is an abrupt/rude message at the moment, as
// it simply closes the socket without sending an official CLOSE message.)
void close();
```
Put together, the usage looks like this: