websockets

Crates.iowebsockets
lib.rswebsockets
version0.3.0
sourcesrc
created_at2020-08-27 23:17:11.232581
updated_at2021-07-29 22:25:01.062203
descriptionA WebSocket client implementation.
homepage
repositoryhttps://github.com/imranmaj/websockets
max_upload_size
id281626
size78,886
(imranmaj)

documentation

http://docs.rs/websockets

README

WebSockets

github crates.io docs.rs

A WebSocket client implementation.

use websockets::WebSocket;

let mut ws = WebSocket::connect("wss://echo.websocket.org/").await?;
ws.send_text("foo".to_string()).await?;
ws.receive().await?;
ws.close(None).await?;

Features

  • Simple API
  • Async/await (tokio runtime)
  • TLS support (automatically detected)

Usage

The WebSocket type manages the WebSocket connection. Use it to connect, send, and receive data. Data is sent and received through Frames.

License

This project is licensed under the MIT license.

Credits

  • Thank you to @thsioutas for adding support for custom TLS configuration
  • Thank you to @secana for making the write half Send
Commit count: 57

cargo fmt