forked from mirror/async-std
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:
|
||||
|
|
Loading…
Reference in a new issue