From 9e96dd5c78ad7938d7af0686825268b50c7f79e8 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Thu, 15 Oct 2020 10:06:39 +0200 Subject: [PATCH] Nutss does not use sequence numbers --- examples/app/app.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/app/app.nim b/examples/app/app.nim index 8f045fc..a746709 100644 --- a/examples/app/app.nim +++ b/examples/app/app.nim @@ -27,7 +27,7 @@ type publicPorts: seq[Port] # Punchd messages - ProgressTcpSyniConnect* = object + Progress* = object command: string args: string @@ -46,7 +46,7 @@ type srcPorts: seq[Port] dstIp: IpAddress dstPorts: seq[Port] - seqNumbers: seq[uint32] + #seqNumbers: seq[uint32] # Exceptions PunchdError = object of ValueError # FIXME: not used yet @@ -141,8 +141,8 @@ proc handlePeerNotifications(serverConn: ServerConnection, echo "received message from ", msg.sender let srcPorts = msg.srcPorts.join(",") let dstPorts = msg.dstPorts.join(",") - let seqNumbers = msg.seqNumbers.join(",") - let req = &"{msg.srcIp}|{srcPorts}|{msg.dstIp}|{dstPorts}|{seqNumbers}" + #let seqNumbers = msg.seqNumbers.join(",") + let req = &"{msg.srcIp}|{srcPorts}|{msg.dstIp}|{dstPorts}" asyncCheck acceptConnection(punchdConn, msg.command, req) except ValueError as e: echo e.msg @@ -155,7 +155,7 @@ proc punchHole(punchdConn: PunchdConnection, serverConn: ServerConnection, let peerInfo = parseMessage[OkGetPeerinfo](sResp) proc progressCb(future: PunchdResponse, msgContent: string) {.async.} = try: - let parsedResp = parseMessage[ProgressTcpSyniConnect](msgContent) + let parsedResp = parseMessage[Progress](msgContent) let req = &"{peerId}|{otherPeerId}|{parsedResp.command}|{parsedResp.args}" discard await serverConn.sendRequest("notify-peer", req) except ServerError as e: