ok, problem solved. just need to wait before sending data. I don't know why: 
    
    
    proc sendClientMsg (c: AsyncSocket) {.async.} =
      while true:
        waitFor sleepAsync(1000)
        let msg = stdin.readLine()
        echo "<- " & msg
        await c.send(msg & "\c\L")
    

Reply via email to