0xlny/tcpholepunching

Is this part correct?

ksp7518 opened this issue · 1 comments

Hello, Dear

ClientA and B have different code below.

A)
proceedHolePunching(InetAddress.getByName(tokens[3].trim()), Integer.parseInt(tokens[1].trim()), Integer.valueOf(tokens[2]));
B)
proceedHolePunching(InetAddress.getByName(tokens[3].trim()), Integer.parseInt(tokens[5].trim()), Integer.valueOf(tokens[4]));

It seems that mistake. I tried fixing it but it doesn't work.

I fixed as below. It's works
Thank you.

...
socketClientPunch = new Socket(ip, tcpPunchPort);
myLocalport = socketClientPunch.getLocalPort(); //ksp
...
proceedHolePunching(InetAddress.getByName(tokens[3].trim()), Integer.parseInt(tokens[5].trim()), myLocalport); //ksp