Naja Melan
f818322a25
Add some documentation to WebSocket and Error.
6 years ago
Naja Melan
bf63a71cd1
cleanup unnecessary dereference
6 years ago
Naja Melan
28579b567a
Improve WebSocketState interface with Copy, PartialEq, ...
6 years ago
Naja Melan
b923ec42c0
Keep processing incoming data even after we have initiated a close handshake.
6 years ago
Artem Vorotnikov
cbf80ecc76
Edition 2018, formatting, clippy fixes
6 years ago
Daniel Abramov
e2bec4b81f
Change the way we return `Err::ConnectionClosed`
...
This way will ensure that we only return this error once. The previous
solution fixed the problem, but it did not guarantee that ""connection
closed" is returned only once.
6 years ago
Daniel Abramov
dbc8bd7b71
Fix issue with hanging server connection
6 years ago
Alexey Galakhov
06308b1b3f
close: fix autobahn regression
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
6 years ago
Alexey Galakhov
b8f7d3668e
close: refine close semantics
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
6 years ago
Yusuke Sasaki
828eafd400
extract the context values from `WebSocket`
6 years ago
Daniel Abramov
c8c3d6290d
Make `Close` part of the `Message` enum
6 years ago
Alexey Galakhov
a7e87488c4
config: make config settable at runtime
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
9b0a2e0f11
trivial: split public and private impl
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
e6ebf5ac76
trivial: style fixes
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
3772aaf163
chore: introduce frame size limit
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
50d1371e52
frame: cleanup frame API
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
20242d19f7
config: protocol: add message size limiting
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
a4f885f69f
protocol: improve write responsibility
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
cb671e1abc
trivial: improve documentation
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Daniel Abramov
00303fa60c
Make the websocket configurable
7 years ago
Teddy DeRego
5742c822ee
WebSocket::write_message will no longer buffer unlimited messages - it will only buffer a configurable number of outbound messages. Needed for snapview/tokio-tungstenite#35 .
7 years ago
Sean Schwartz
66d2c15f2d
Derive Debugs
...
Deny missing debug and resolve resulting errors to satisfy:
https://rust-lang-nursery.github.io/api-guidelines/debuggability.html#all-public-types-implement-debug-c-debug
Requires updated input_buffer pushed to crates.io:
- Resolved build errors by using github version of code until new version available on crates.io
Upgrade env_logger dev-dependency to v0.5.3
- Removed unwrap call from env_logger::init() as it is no longer needed.
7 years ago
Alex Crichton
9f6f42766e
Add `Ping` and `Pong` variants to `Message`
...
This'll allow removal/deprecation of the `send_ping` custom method but also
allow applications to react to `Pong` messages as appropriate.
Closes #16
8 years ago
Alexey Galakhov
e3c0ec30c8
Fix close handling while read.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Denis Andrejew
624f1dec1a
improve doc in protocol/mod.rs
8 years ago
Alexey Galakhov
66e30b2767
Return close frame with ConnectionClosed
...
This is a breaking change, thus bump the API version.
Closes : #10
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
bd37c71609
Replace tuple with CloseFrame struct
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Ran Benita
ae30b8cd76
Apply a couple trivial clippy suggestions
8 years ago
Alexey Galakhov
e2b7b73e72
Improve documentation.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
53aa24b06b
Fix warnings
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
037dea1f8e
Add possibility to send pings
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
06a39b4962
protocol: add get_ref() and get_mut()
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
9e00140e19
trivial: debug logging cleanup
8 years ago
Alexey Galakhov
334ceab2b0
protocol: less strict trait requirements
8 years ago
Alexey Galakhov
604e2021ce
protocol: add write_pending() functions
...
The semantics of write_message() and write_frame()
is changed accordingly.
8 years ago
Alexey Galakhov
d27f768599
protocol: fix infinite loop in non-blocking mode
8 years ago
Daniel Abramov
0938a17552
Move `no_block()` related stuff into seperate mod
8 years ago
Alexey Galakhov
3bb4331f4f
protocol: fix bug with async handling
8 years ago
Alexey Galakhov
46bfd81539
protocol: correct non-blocking handling
8 years ago
Alexey Galakhov
4714773370
close: implement complete close handshake
8 years ago
Alexey Galakhov
e63f594a14
Initial commit, mostly working client
8 years ago