improve debug output

This commit is contained in:
Christian Ulrich 2020-08-23 14:41:38 +02:00
parent acfcb79108
commit 6836c54737
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 2 additions and 1 deletions

View File

@ -226,7 +226,7 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string,
let (hasSock, sock) = await punchdConn.inConnections.read
if not hasSock:
break
echo "got connection"
echo "accepted!"
let msg = await sock.recv(1000)
echo "received message: ", msg
await sock.send("pong")
@ -237,6 +237,7 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string,
Port(1234))
asyncCheck handleServerMessages(serverConn)
let sock = await punchHole(punchdConn, serverConn, peerId, otherPeerId)
echo "connected!"
await sock.send("ping")
let msg = await sock.recv(1000)
echo "received message: ", msg