add debug output
This commit is contained in:
parent
87f1ed89fb
commit
c8a9a32a3f
|
@ -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 nativesockets import SockAddr, SockAddr_storage, SockLen
|
||||||
from sequtils import any
|
from sequtils import any
|
||||||
|
@ -41,6 +41,7 @@ proc punch(puncher: Puncher, peerIp: IpAddress, peerPort: Port,
|
||||||
raise newException(PunchHoleError,
|
raise newException(PunchHoleError,
|
||||||
"hole punching for given parameters already active")
|
"hole punching for given parameters already active")
|
||||||
puncher.attempts.add(attempt)
|
puncher.attempts.add(attempt)
|
||||||
|
echo &"sending msg {msg} to {peerIp}, predicted ports: {attempt.dstPorts}"
|
||||||
var peerAddr: Sockaddr_storage
|
var peerAddr: Sockaddr_storage
|
||||||
var peerSockLen: SockLen
|
var peerSockLen: SockLen
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue