mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-06 04:35:32 +00:00
markup and typo nits
This commit is contained in:
parent
a41b87205d
commit
9974ff692e
2 changed files with 6 additions and 7 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
Nothing is as simple as a chat server, right? Not quite, chat servers
|
||||
already expose you to all the fun of asynchronous programming: how
|
||||
do you handle client connecting concurrently. How do handle them disconnecting?
|
||||
How do your distribute the messages?
|
||||
do you handle clients connecting concurrently. How do you handle them disconnecting?
|
||||
How do you distribute the messages?
|
||||
|
||||
In this tutorial, we will show you how to write one in `async-std`.
|
||||
|
||||
|
|
|
@ -8,15 +8,15 @@ Protocol consists of utf-8 messages, separated by `\n`.
|
|||
The client connects to the server and sends login as a first line.
|
||||
After that, the client can send messages to other clients using the following syntax:
|
||||
|
||||
```
|
||||
login1, login2, ... login2: message
|
||||
```text
|
||||
login1, login2, ... loginN: message
|
||||
```
|
||||
|
||||
Each of the specified clients than receives a `from login: message` message.
|
||||
|
||||
A possible session might look like this
|
||||
|
||||
```
|
||||
```text
|
||||
On Alice's computer: | On Bob's computer:
|
||||
|
||||
> alice | > bob
|
||||
|
@ -29,7 +29,6 @@ On Alice's computer: | On Bob's computer:
|
|||
The main challenge for the chat server is keeping track of many concurrent connections.
|
||||
The main challenge for the chat client is managing concurrent outgoing messages, incoming messages and user's typing.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Let's create a new Cargo project:
|
||||
|
@ -45,4 +44,4 @@ At the moment `async-std` requires Rust nightly, so let's add a rustup override
|
|||
$ rustup override add nightly
|
||||
$ rustc --version
|
||||
rustc 1.38.0-nightly (c4715198b 2019-08-05)
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue