#websocket

websocket-client

A websocket client library which supports both desktop and webassembly

3 unstable releases

0.2.0 Aug 21, 2018
0.1.1 Aug 21, 2018
0.1.0 Aug 21, 2018

#43 in WebSocket

Download history 35/week @ 2018-08-22 9/week @ 2018-08-29 3/week @ 2018-09-05 5/week @ 2018-09-12 1/week @ 2018-09-19 6/week @ 2018-09-26 6/week @ 2018-10-03 34/week @ 2018-10-17 6/week @ 2018-10-24

5 downloads per month

MIT license

14KB
269 lines

A websocket client library which supports both desktop and webassembly. It's only been tested on Linux and wasm32-unknown-emscripten, but should work on other desktop platforms and other webassembly targets.

It uses a polling API for receiving messages, so it's probably most suitable for games, which would poll every frame. It may not be suitable for applications which need to respond to messages within milliseconds of receiving them, since the polling would add a slight delay.

This supports both text and binary data. On desktop, it uses websocket. On webassembly, it uses JavaScript through stdweb.


lib.rs:

A websocket client library which supports both desktop and webassembly. It's only been tested on Linux and wasm32-unknown-emscripten, but should work on other desktop platforms and other webassembly targets.

It uses a polling API for receiving messages, so it's probably most suitable for games, which would poll every frame. It may not be suitable for applications which need to respond to messages within milliseconds of receiving them, since the polling would add a slight delay.

This supports both text and binary data. On desktop, it uses websocket. On webassembly, it uses JavaScript through stdweb.

Dependencies

~2MB
~43K SLoC