Guillaume Desmottes
0a299fb5fe
examples: gio-echo-server: fix clippy warnings
2 years ago
Carlos Martín Nieto
7805e80aec
gio-echo-server: add an example with a SocketService
...
This lets us use the SocketService we might already want to use and use it for a
websocket server.
2 years ago
Carlos Martín Nieto
fe1c2aeb95
gio-echo: explicitly close the stream
...
Not doing so means we rudely disconnect from the socket without clong out our
websocket stream
2 years ago
Remalloc
952681ed06
Fix the unreachable test url
2 years ago
Ahmed Charles
2e61ecbbb1
Add an example of using tungstenite with a custom accept.
2 years ago
Leo
dfa69eaea4
Fix the echo server example to prevent ConnectionClosed error ( #189 )
...
Related #188
The echo server would generate ConnectionClosed error when the peer
close the connection normally. This is because that `tungstenite` crate
automatically reply Close message to the peer. Then StreamExt::forward()
also forwards the Close message after the connection is closed.
3 years ago
Sebastian Dröge
1170f4e080
Fix a couple of clippy warnings
4 years ago
Constantin Nickel
253f8c9291
Update to tokio 1.0
4 years ago
Josh Matthews
00fa09ce37
Add openssl support.
5 years ago
Sebastian Dröge
29e528d1bc
Switch from deprecated tokio-tls to tokio-native-tls
5 years ago
Cheng JIANG
3d668b5b8f
use re-expored tungstenite
5 years ago
Mark Lodato
70c77160a9
Update example to not broadcast close messages.
...
In the event that the client sends a close message,
it is broadcast to other clients closing them as well.
5 years ago
Mark Lodato
6bffd862b6
Updates example commands to include async features
...
Due to the error: "target `XXX` in package `async-tungstenite`
requires the features: `async-std-runtime`".
Also updated the echo-server example command to start echo-server
instead of server.
5 years ago
Erich Gubler
d4eea7211c
build(deps): minimize unnecessary dependencies by using `futures-{channel,io,util}` directly instead of `futures` outside of tests/examples
5 years ago
hbgl
42d6771357
Add example of server periodically updating client
5 years ago
Sebastian Dröge
3a994e6e3b
Update to tungstenite 0.10
...
Partially based on tungstenite commits
- 46dfd9ed3ee75b0261e9f5f71c8e70492407248b by Alexey Galakhov
- 31010fd636b3edc683199e3182ea34d799118d5b by Alexey Galakhov
5 years ago
Alexey Galakhov
016f21f5b4
tests: do not report expected autobahn errors
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
5 years ago
Kelly Thomas Kline
40757271f0
Add examples README.md
...
As mentioned at https://github.com/sdroege/async-tungstenite/pull/3 , a later PR could add a brief description to each example.
5 years ago
Daniel Abramov
40943ec32c
examples: improve client example
5 years ago
Daniel Abramov
c02a5399b2
examples: improve server example
5 years ago
Alexey Galakhov
5d44a92fdf
autobahn: don't panic in server
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
5 years ago
Alexey Galakhov
418d6d87bb
autobahn: don't panic in client
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
5 years ago
Nathan Torchia
744c7fd124
Added server example
5 years ago
Sebastian Dröge
c2ff77b446
Refactor features and optional API and add support for tokio/gio async runtimes
5 years ago
Sebastian Dröge
5613f9e47d
Directly pass socket address strings to the connect/bind functions
5 years ago
Sebastian Dröge
c2374308b0
Fix various clippy warnings
5 years ago
Daniel Abramov
4a71349d38
Clean up examples
5 years ago
Sebastian Dröge
e86a2f4ae7
Remove WebSocketStream::send()
...
The same functionality is already provided via StreamExt::send() and
unlike the custom implementation it handles WouldBlock correctly and not
as an error.
5 years ago
Atul Bhosale
eb2c63ee73
Format code using 'cargo fmt'
5 years ago
Danny Browning
3ccd307be3
Update to work on stable
5 years ago
Sebastian Dröge
b76d8cbc03
Port/rename to async-std / async-tungstenite
5 years ago
Danny Browning
1cbac51d14
Bringing splitting back
5 years ago
Danny Browning
3821e0952a
Tokio 0.2 Conversion
...
Update to use tokio 0.2 ecosystem to integrate with tungstenite.
5 years ago
Artem Vorotnikov
9bd5f01784
Upgrade to Rust 2018, format the code
5 years ago
Alexey Galakhov
8b13cb7ad3
test: add autobahn tests
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
6 years ago
Jeffrey Esquivel S
eda57a012c
Implement support to get the peer address
6 years ago
Jeffrey Esquivel S
6c3b8a5137
Update comment to reflect current code
6 years ago
Euan Rochester
e2012633b4
Port to tokio reform
7 years ago
Alexey Galakhov
77d4d5b66f
Update for Tungstenite 0.5.0
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Richard Petrie
8adb7c000a
Fixed a typo
7 years ago
Nelson Chen
0cd210cfcd
Change example server to use `unbounded_send()`
...
`send()` is deprecated
7 years ago
Daniel Abramov
c0ab50ba57
Remove deprecated futures features
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 .
7 years ago
Alexey Galakhov
7fbf836851
Update example for new API.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
pyros2097
b621d9f213
Fix example not working
8 years ago
Alexey Galakhov
4b646308be
refactor: use asyncronous handshakes
8 years ago
Daniel Abramov
65aac6664e
Add examples on how to use the library
8 years ago