I do not really understand your concrete question. I think the fundamental file
transfer example was from the beginning the async chat server, which was
described in some detail in the Picheta book, and partly in the Nim API docs. I
don't remember details, but I think this example is very similar:
<https://ssalewski.de/nimprogramming.html#_a_chat_server_application> Let me
know if it should fail with latest Nim. For details you may consult the Nim API
docs. I do know no details, sorry. For a real work example, you may look at
<https://github.com/zedeus/nitter>, a famous twitter clone.