Daniel Abramov
7d2f0c9ffb
Return `Close` messages to the user
...
Solves #45 and #51
6 years ago
Andreas Neuhaus
430c06048d
Add `MaybeTlsStream` wrapper type for streams that optionally use TLS
...
Connecting to a URL wraps the connection into this wrapper type based
on the protocol of the URL (`ws:` or `wss:`). Making this type public
allows client applications to specify the websocket's type without
importing the tokio_tls crate.
6 years ago
Ryan Leckey
b9b6f2de5a
Update tokio-tls to 0.2 and replace fully tokio-core with tokio
6 years ago
Daniel Abramov
b61ed96561
Update to the newest `tungstenite-rs` version
...
* Fixes #35
* Replaces https://github.com/snapview/tokio-tungstenite/pull/40
* Gives a good background for https://github.com/snapview/tokio-tungstenite/pull/41
7 years ago
Euan Rochester
e2012633b4
Port to tokio reform
7 years ago
Ran Benita
0db773ab36
Allow constructing WebSocketStream without performing a handshake
...
Add wrappers around similar constructors for tungstenite::WebSocket.
These are useful when doing protocol upgrades in a hyper server, where
the handshake was already performed by the HTTP server.
7 years ago
Alexey Galakhov
370a10fc10
trivial: make tungstenite crate public
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
d79ffb5750
connect: add function for stream upgrading
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Daniel Abramov
16c4693c91
Implement `Stream::close` for WebSocket
7 years ago
Alexey Galakhov
77d4d5b66f
Update for Tungstenite 0.5.0
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Daniel Abramov
f9c3948c51
Replace redundant `Request` structure
...
Let's reuse the corresponding structure from tungstenite.
7 years ago
Daniel Abramov
b0ad00230b
Adapts tokio-tungstenite to tungstenite/headers
...
Basically changes the code of tokio-tungstenite to match the latest
(current) status of tungstenite-rs. Fixes #13 , fixes #9 , fixes #6 .
8 years ago
Alexey Galakhov
e7c3ef5250
Set TCP_NODELAY on connect.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
5fbcd8d413
Add "connect" convenience function.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
c6b76a5c87
Add missing documentation for Url struct
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alex Shapiro
15167ab718
allow client to initiate connection with extra headers
...
Alter `client_async` to allow connections with a Request object that may contain extra headers, including a WebSocket protocol.
8 years ago
Daniel Abramov
b2b77893c2
Migrate to the tokio-io ( fixes #1 )
8 years ago
Alexey Galakhov
1a7d3f976e
Cleanup unused macro_use
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
4b646308be
refactor: use asyncronous handshakes
8 years ago
Alexey Galakhov
0a21d17042
Change Sink according to new tungstenite semantics
8 years ago
Daniel Abramov
dbd9c7775b
Add unit tests for handshakes
8 years ago
Daniel Abramov
ddf30ee987
Adds additional things for the handshakes
8 years ago
Daniel Abramov
e279aafd54
Documentation added
8 years ago
Daniel Abramov
e1f65c4a20
Add tokio bindings for the library
...
Needs some improvements, for instance the copy-paste can be removed.
8 years ago
Daniel Abramov
a4315eb509
Repository created.
8 years ago