Example code is from the Chat Server Example here: 
[https://nim-lang.org/docs/asyncnet.html](https://nim-lang.org/docs/asyncnet.html)

Code in question:
    
    
    proc processClient(client: AsyncSocket) {.async.} =
      while true:
        let line = await client.recvLine()
        if line.len == 0: break
        for client in clients:
          discard client.socket.send(line & "\c\L")
    
    
    Run

I replaced `await` with `discard`, and everything compiles, no errors, and the 
chat still works flawlessly.

What's the difference between `await` and `discard` in this context?

Reply via email to