Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Commit d4cad34

Browse files
committed
move tutorial to readme
1 parent d7444eb commit d4cad34

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tutorial.adoc renamed to README.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
In this tutorial, we will implement an asynchronous chat on top of async-std.
99

10+
https://htmlpreview.github.io/?https://raw.githubusercontent.com/async-std/a-chat/master/README.html?token=AANB3M5MMJ5DZVW74H2CX2K5LLLYS[HTML version]
11+
1012
== Specification
1113

1214
The chat uses a simple text protocol over TCP.
@@ -349,7 +351,7 @@ async fn broker(mut events: Receiver<Event>) -> Result<()> {
349351
Note how we don't need a `Mutex` here and can confidently say, at each iteration of the broker's loop, what is the current set of peers
350352
<3> To handle a message we send it over a channel to each destination
351353
<4> To handle new peer, we first register it in the peer's map ...
352-
<4> ... and then spawn a dedicated task to actually write the messages to the socket.
354+
<5> ... and then spawn a dedicated task to actually write the messages to the socket.
353355

354356
== All Together
355357

@@ -937,4 +939,4 @@ async fn try_main(addr: impl ToSocketAddrs) -> Result<()> {
937939

938940
<1> Here we split `TcpStream` into read and write halfs: there's `impl AsyncRead for &'_ TcpStream`, just like the one in std.
939941
<2> We crate a steam of lines for both the socket and stdin.
940-
<3> In the main select loop, we print the lines we receive from server and send the lines we read from the console.
942+
<3> In the main select loop, we print the lines we receive from server and send the lines we read from the console.

tutorial.html renamed to README.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ <h1>a-chat tutorial</h1>
447447
<div class="paragraph">
448448
<p>In this tutorial, we will implement an asynchronous chat on top of async-std.</p>
449449
</div>
450+
<div class="paragraph">
451+
<p><a href="https://htmlpreview.github.io/?https://raw.githubusercontent.com/async-std/a-chat/master/README.html?token=AANB3M5MMJ5DZVW74H2CX2K5LLLYS">HTML version</a></p>
452+
</div>
450453
</div>
451454
</div>
452455
<div class="sect1">

0 commit comments

Comments
 (0)