#websocket #tokio

basws-client

A simple async WebSocket client/server framework

12 releases

0.1.4 Feb 8, 2021
0.1.3 Feb 5, 2021
0.1.1 Jan 30, 2021
0.1.0-dev-8 Oct 20, 2020
0.1.0-dev-6 Sep 30, 2020

#87 in WebSocket

Download history 26/week @ 2022-03-10 50/week @ 2022-03-17 2/week @ 2022-03-24 3/week @ 2022-03-31 3/week @ 2022-04-07 3/week @ 2022-04-14 3/week @ 2022-04-21 37/week @ 2022-04-28 74/week @ 2022-05-05 195/week @ 2022-05-12 51/week @ 2022-05-19 62/week @ 2022-05-26 111/week @ 2022-06-02 8/week @ 2022-06-09 5/week @ 2022-06-16 3/week @ 2022-06-23

151 downloads per month
Used in basws

MIT license

25KB
580 lines

basws-client

crate version

basws-client is a simple WebSocket framework. For more information, see the basws README.

To set up your own protocol client:

  • Implement the ClientLogic trait
  • Create a Client passing in your ClientLogic implementor
  • Spawn the client by either client.run().await or client.spawn()
  • You can clone the client and pass it around in your application as needed

For a full example, check out the chat-client example.

Dependencies

~8–15MB
~297K SLoC