Skip to content

Commit bb582c1

Browse files
committed
add note about websocat url
1 parent 489eca7 commit bb582c1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: readme.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ Then you can `@import("ws")` in [src/main.zig](examples/exe/src/main.zig#L2).
1717
This example uses public echo ws server at ws://ws.vi-server.org/mirror/.
1818
Connects to websocket server, sends hello message and prints echoed reply.
1919

20+
Above url is taken from [websocat - curl for WebSocket](https://github.com/vi/websocat) tool.
21+
22+
You can start websocat server locally with for example:
23+
```sh
24+
websocat -s 8080
25+
```
26+
and then connect to it by changing [hostname, uri, port](examples/exe/src/main.zig#L9:L11) to:
27+
```Zig
28+
const hostname = "localhost";
29+
const uri = "ws://localhost/";
30+
const port = 8080;
31+
```
32+
2033
### References
2134

2235
[The WebSocket Protocol RFC](https://www.rfc-editor.org/rfc/rfc6455)

0 commit comments

Comments
 (0)