doc-push icon indicating copy to clipboard operation
doc-push copied to clipboard

Getting Started Example Chat Server is Pretty Advanced

Open rylev opened this issue 7 years ago • 2 comments

Currently the getting started example is a chat server that includes several concepts that have yet to be explained like codecs. Would it better for readers if the example only used concepts explained in the guide? What could we replace the example with?

rylev avatar Oct 04 '18 19:10 rylev

@rylev Maybe switch to a client example (#40). The chat example can be moved to the transport section then?

carllerche avatar Oct 05 '18 04:10 carllerche

I agree with @rylev the chat example chat.rs contains lots of new concepts and chat-combinator.rs is not intuitive. I think we should first identify main actors, tasks and futures and then define they relationship. after that we should implement each task and connect them with channels clearly.

for example in a chat system there are following tasks:

  1. A task for accepting new client connection
  2. A task for reading from client socket and broadcast to other client tasks via message channel
  3. A task for reading form message channel and send data to client via client socket

alishir avatar Nov 14 '18 06:11 alishir