From c8a9a32a3f04d57ae5a4b4fac2d78dd120a6f050 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Tue, 17 Nov 2020 22:50:00 +0100 Subject: [PATCH] add debug output --- puncher.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/puncher.nim b/puncher.nim index d985806..11a6562 100644 --- a/puncher.nim +++ b/puncher.nim @@ -1,4 +1,4 @@ -import asyncdispatch, asyncnet, net, port_prediction +import asyncdispatch, asyncnet, net, port_prediction, strformat from nativesockets import SockAddr, SockAddr_storage, SockLen from sequtils import any @@ -41,6 +41,7 @@ proc punch(puncher: Puncher, peerIp: IpAddress, peerPort: Port, raise newException(PunchHoleError, "hole punching for given parameters already active") puncher.attempts.add(attempt) + echo &"sending msg {msg} to {peerIp}, predicted ports: {attempt.dstPorts}" var peerAddr: Sockaddr_storage var peerSockLen: SockLen try: