Nutss does not use sequence numbers

This commit is contained in:
Christian Ulrich 2020-10-15 10:06:39 +02:00
parent b7837c43e6
commit 9e96dd5c78
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 5 additions and 5 deletions

View File

@ -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: