File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ static pointer from_url(/service/std::string url);
37
37
static pointer create_dummy();
38
38
39
39
// Function to perform actual network send()/recv() I/O:
40
- void poll();
40
+ // (note: if all you need is to recv()/dispatch() messages, then timeout can be
41
+ // used to block until a message arrives)
42
+ void poll(int timeout = 0);
41
43
42
44
// Receive a message, and pass it to callable(). Really, this just looks at
43
45
// a buffer (filled up by poll()) and decodes any messages in the buffer.
@@ -51,8 +53,8 @@ void dispatch(Callable callable);
51
53
// later):
52
54
void send(std::string message);
53
55
54
- // Close the WebSocket (N.B. - this is an abrupt/rude message at the moment, as
55
- // it simply closes the socket without sending an official CLOSE message.)
56
+ // Close the WebSocket (send a CLOSE message over WebSocket, then close() the
57
+ // actual socket when the send buffer becomes empty):
56
58
void close();
57
59
```
58
60
You can’t perform that action at this time.
0 commit comments