improve debug output
This commit is contained in:
parent
acfcb79108
commit
6836c54737
|
@ -226,7 +226,7 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string,
|
||||||
let (hasSock, sock) = await punchdConn.inConnections.read
|
let (hasSock, sock) = await punchdConn.inConnections.read
|
||||||
if not hasSock:
|
if not hasSock:
|
||||||
break
|
break
|
||||||
echo "got connection"
|
echo "accepted!"
|
||||||
let msg = await sock.recv(1000)
|
let msg = await sock.recv(1000)
|
||||||
echo "received message: ", msg
|
echo "received message: ", msg
|
||||||
await sock.send("pong")
|
await sock.send("pong")
|
||||||
|
@ -237,6 +237,7 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string,
|
||||||
Port(1234))
|
Port(1234))
|
||||||
asyncCheck handleServerMessages(serverConn)
|
asyncCheck handleServerMessages(serverConn)
|
||||||
let sock = await punchHole(punchdConn, serverConn, peerId, otherPeerId)
|
let sock = await punchHole(punchdConn, serverConn, peerId, otherPeerId)
|
||||||
|
echo "connected!"
|
||||||
await sock.send("ping")
|
await sock.send("ping")
|
||||||
let msg = await sock.recv(1000)
|
let msg = await sock.recv(1000)
|
||||||
echo "received message: ", msg
|
echo "received message: ", msg
|
||||||
|
|
Loading…
Reference in New Issue