mirror of
https://github.com/actix/actix-web.git
synced 2024-09-09 05:08:32 +00:00
Guide: updates to the WebSockets chapter.
This commit is contained in:
parent
ab60ec6e1d
commit
1f08100f6f
1 changed files with 6 additions and 6 deletions
|
@ -3,10 +3,10 @@
|
|||
Actix supports WebSockets out-of-the-box. It is possible to convert a request's `Payload`
|
||||
to a stream of [*ws::Message*](../actix_web/ws/enum.Message.html) with
|
||||
a [*ws::WsStream*](../actix_web/ws/struct.WsStream.html) and then use stream
|
||||
combinators to handle actual messages. But it is simpler to handle websocket communications
|
||||
combinators to handle actual messages, but it is simpler to handle websocket communications
|
||||
with an http actor.
|
||||
|
||||
This is example of a simple websocket echo server:
|
||||
The following is example of a simple websocket echo server:
|
||||
|
||||
```rust
|
||||
# extern crate actix;
|
||||
|
@ -41,8 +41,8 @@ fn main() {
|
|||
}
|
||||
```
|
||||
|
||||
A simple websocket echo server example is available in the
|
||||
[examples directory](https://github.com/actix/actix-web/blob/master/examples/websocket).
|
||||
> A simple websocket echo server example is available in the
|
||||
> [examples directory](https://github.com/actix/actix-web/blob/master/examples/websocket).
|
||||
|
||||
An example chat server with the ability to chat over a websocket or tcp connection
|
||||
is available in [websocket-chat directory](https://github.com/actix/actix-web/tree/master/examples/websocket-chat/)
|
||||
> An example chat server with the ability to chat over a websocket or tcp connection
|
||||
> is available in [websocket-chat directory](https://github.com/actix/actix-web/tree/master/examples/websocket-chat/)
|
||||
|
|
Loading…
Reference in a new issue