async-std icon indicating copy to clipboard operation
async-std copied to clipboard

Modernize a-chat

Open skade opened this issue 6 years ago • 0 comments

This has to be considered a draft.

The 2 major changes are:

  1. Move the client to use 2 concurrent tasks and selecting on them for any errors. The tasks are sufficiently diverse to merit 2 tasks.
  2. Move the 2 select statements to unified streams and having the broker and the client handle a set of "Events" themselves. This moves their logic down to a nice match.

The stream construction is still a bit ugly, though, especially in the client handling code of the server.

skade avatar Oct 30 '19 16:10 skade