Tagged: ConnectionInfo, NAT, Router
- This topic has 5 replies, 2 voices, and was last updated 12 years, 6 months ago by
Anonymous.
-
AuthorPosts
-
May 4, 2013 at 13:20 #808
Anonymous
InactiveGood day! I have encoutered a problem with your library.
I have both a clientside program and serverside program. Both client and server are behind different routers and different IP`s.When the client connects to a server, after the ‘connectionInfo’ is asked, server recieves global IP adress of client:
[6 - Debug] - Waiting for client connnectionInfo from [TCP] 192.168.1.110:27016 -> 95.31.25.243:12774Then we send ‘ConnectionSetup’ packet to client:
[7 - Debug] - Received packet of type ConnectionSetup from [TCP] 192.168.1.110:27016 -> 95.31.25.243:12774, containing 48 header bytes and 43 payload bytes.
[8 - Debug] - Connection keep alive polling thread has started.After all, connectionInfo contains not global IP adress of client, but its local IP:
[TCP] 192.168.1.110:27016 -> 192.168.1.14:12774So I can’t send packets to client anymore.
How can I fix that?May 4, 2013 at 13:46 #814Anonymous
InactiveHeya Evgeniy. Many thanks for your interest in our library and reporting the problem. I can see this might causes issues. I will do my best to find a solution.
Regards,
MarcMay 6, 2013 at 12:13 #827Anonymous
InactiveI’ve confirmed this is a bug. We will endeavor to fix it as soon as possible.
In the meantime, if its suitable, you may be able to use UDPConnection as a work around which should not have this bug.
Regards,
MarcMay 6, 2013 at 12:49 #829Anonymous
InactiveThank you. Could the problem possibly be in this block?
internal void UpdateInfoAfterRemoteHandshake(ConnectionInfo handshakeInfo)
{
lock (internalLocker)
{
NetworkIdentifier = handshakeInfo.NetworkIdentifier;
RemoteEndPoint = handshakeInfo.LocalEndPoint;
IsConnectable = handshakeInfo.IsConnectable;
}
}
In this line?
RemoteEndPoint = handshakeInfo.LocalEndPoint;May 6, 2013 at 12:53 #831Anonymous
InactiveThat’s correct but the solution is unfortunately not straight forward as changing that block of code has significant consequences. There are multiple solutions, each with benefits/drawbacks which I am currently investigating.
May 7, 2013 at 12:29 #832Anonymous
InactiveHeya Evgeniy,
I have posted a fix for the NAT issue, you can download the latest source from here https://bitbucket.org/MarcF/networkcomms.net/get/tip.zip. I have briefly tested the fix but if you could download and confirm that would be appreciated. Assuming there are no further problems this fix will be in the next version release.
Kind regards,
Marc -
AuthorPosts
- You must be logged in to reply to this topic.
