try other direction

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

View File

@ -227,9 +227,9 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string,
if not hasSock:
break
echo "accepted!"
await sock.send("ping")
let msg = await sock.recv(1000)
echo "received message: ", msg
await sock.send("pong")
else:
# initiate a new connection
@ -238,9 +238,9 @@ proc runApp(serverHostname: string, serverPort: Port, peerId: string,
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
await sock.send("pong")
proc main() =
if paramCount() < 3 or paramCount() > 4: