| Crates.io | websocket-transport |
| lib.rs | websocket-transport |
| version | 0.1.0 |
| created_at | 2017-09-07 02:45:53.610812+00 |
| updated_at | 2017-09-07 02:45:53.610812+00 |
| description | Easy async WebSocket wrapper which implements Stream + Sink for String |
| homepage | https://github.com/spinda/websocket-transport |
| repository | https://github.com/spinda/websocket-transport |
| max_upload_size | |
| id | 30860 |
| size | 30,555 |
Easy async WebSocket wrapper which implements
StreamandSinkforString
First, add this to your Cargo.toml:
[dependencies]
websocket-transport = "0.1"
Next, add this to your crate:
extern crate websocket_transport;
use websocket_transport::WsTransport;
The
WsTransport
type provides an easy wrapper around an async WebSocket which implements
Stream
and
Sink
for String.
This type automatically takes care of:
Pings, as the Stream is polledBinary messages to UTF-8 StringsIt can be wrapped around
Client
or any other type which implements
Stream
and
Sink for
OwnedMessage.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.