Skip to content

Commit ce6bfd5

Browse files
committed
Update README.
1 parent 81ed98c commit ce6bfd5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ static pointer from_url(/service/std::string url);
3737
static pointer create_dummy();
3838

3939
// 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);
4143

4244
// Receive a message, and pass it to callable(). Really, this just looks at
4345
// a buffer (filled up by poll()) and decodes any messages in the buffer.
@@ -51,8 +53,8 @@ void dispatch(Callable callable);
5153
// later):
5254
void send(std::string message);
5355

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):
5658
void close();
5759
```
5860

0 commit comments

Comments
 (0)