Crates.io | websockets |
lib.rs | websockets |
version | 0.3.0 |
source | src |
created_at | 2020-08-27 23:17:11.232581 |
updated_at | 2021-07-29 22:25:01.062203 |
description | A WebSocket client implementation. |
homepage | |
repository | https://github.com/imranmaj/websockets |
max_upload_size | |
id | 281626 |
size | 78,886 |
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?;
The WebSocket
type manages the WebSocket connection.
Use it to connect, send, and receive data.
Data is sent and received through Frame
s.
This project is licensed under the MIT license.
Send