Alexey Galakhov
6f8c4e7034
Use input_buffer as separate crate.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
3091d11566
callback static dispatch
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Daniel Abramov
c4013ccad3
Improve the `handshake::client::Request` structure
8 years ago
Daniel Abramov
5982d4094d
Update README and examples
8 years ago
Daniel Abramov
44a15c9eab
Implements #6 (client/server headers access)
8 years ago
Daniel Abramov
f34c488217
Add basic support for examining headers ( #6 )
8 years ago
Alexey Galakhov
6faf90cd7b
trivial: remove commented-out code
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
bd9ac9673e
chore: cleanup docs and warnings, strict docs
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
f696771069
Generalize connect() interface.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
22f7df0b46
Fix possible deadlock in handshake.
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
d29e3948d2
Add Debug, Display and Error to HandshakeError
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
24f3bb7807
Add the possibility to pass extra request headers.
...
Closes : #5
Suggestions for a more convenient API are welcome.
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Ran Benita
76e80ca9a3
Only allocate error message if the error occurred
...
Suggested by clippy:
warning: use of `ok_or` followed by a function call
--> src/handshake/server.rs:20:19
|
20 | let key = self.headers.find_first("Sec-WebSocket-Key")
| ___________________^ starting here...
21 | | .ok_or(Error::Protocol("Missing Sec-WebSocket-Key".into()))?;
| |_______________________________________________________________________^ ...ending here
|
= note: #[warn(or_fun_call)] on by default
help: try this
| let key = self.headers.find_first("Sec-WebSocket-Key").ok_or_else(|| Error::Protocol("Missing Sec-WebSocket-Key".into()))?;
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#or_fun_call
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
9e00140e19
trivial: debug logging cleanup
8 years ago
Alexey Galakhov
c6d3dd6404
refactor: fix unit tests for new API
8 years ago
Alexey Galakhov
b7557f1baa
refactor: make handshake completely async
8 years ago
Alexey Galakhov
e6b658d94f
handshake: add the ability to iterate over headers.
8 years ago
Daniel Abramov
93843a1290
Fix `WouldBlock` error handling for the handshakes
8 years ago
Alexey Galakhov
7dccc51277
server: implement server
8 years ago
Alexey Galakhov
422f7bbc45
trivial: move MIN_READ to input_buffer
8 years ago
Alexey Galakhov
e63f594a14
Initial commit, mostly working client
8 years ago