Skip to content

Commit 7f0c881

Browse files
committed
docs
1 parent e2d915b commit 7f0c881

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
WebSocket frame parser
22
======================
33

4+
This is a parser for WebSocket frame-messages (see [RFC6455](https://tools.ietf.org/html/rfc6455)) written in C.
5+
46
### Features
57
* Fast parsing and building of websocket messages
68
* No dependencies
@@ -10,8 +12,6 @@ WebSocket frame parser
1012
* No allocations
1113
* It can be interrupted at anytime
1214

13-
This is a parser for WebSocket frame-messages (see [RFC6455](https://tools.ietf.org/html/rfc6455)) written in C.
14-
1515
Tested as part of [PHP-ION](https://github.com/php-ion/php-ion) extension.
1616

1717
Inspired by [http-parser](https://github.com/joyent/http-parser) by [Ryan Dahl](https://github.com/ry)
@@ -99,7 +99,7 @@ free(parser);
9999
Calculate required memory for frame using `websocket_calc_frame_size` function
100100

101101
```c
102-
size_t frame_len = websocket_calc_frame_size(WS_OP_TEXT | WS_FIN | WS_HAS_MASK, data_len);
102+
size_t frame_len = websocket_calc_frame_size(WS_OP_TEXT | WS_FINAL | WS_HAS_MASK, data_len);
103103
char * frame = malloc(sizeof(char) * frame_len);
104104
```
105105

@@ -109,7 +109,7 @@ build frame
109109
websocket_build_frame(frame, WS_OP_TEXT | WS_FIN | WS_HAS_MASK, mask, data, data_len);
110110
```
111111
112-
and send frame via socket
112+
and send binary string via socket
113113
114114
```c
115115
write(sock, frame, frame_len);

0 commit comments

Comments
 (0)