aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'client/libacron/README.md')
-rw-r--r--client/libacron/README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/libacron/README.md b/client/libacron/README.md
index 5fba5c6..14d37ad 100644
--- a/client/libacron/README.md
+++ b/client/libacron/README.md
@@ -214,6 +214,16 @@ while (!(r = ac_receive(connection, buffer, bytes, &obj))) {
}
```
+> **Note**:
+>
+> In some cases, the buffer may contain more than one valid WebSocket frames. In such cases,
+> `ac_receive` will backlog the additional parsed messages, and they will return the second time
+> calling `ac_receive` with buffer = bytes = 0.
+>
+> This will happen only `ac_receive` returns zero with a non-NULL obj output. If that is true,
+> the client must additionally call `ac_receive` infinite times with buffer = bytes = 0, until either
+> `ac_receive` returns an error or obj output is NULL.
+
The program can make requests using `ac_request()`:
```c