Home Forums Support [PROBLEM] ConnectionInfo+NAT

  • This topic has 5 replies, 2 voices, and was last updated 11 years ago by Anonymous.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #808
    Anonymous
    Inactive

    Good 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:12774

    Then 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:12774

    So I can’t send packets to client anymore.
    How can I fix that?

    #814
    Anonymous
    Inactive

    Heya 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,
    Marc

    #827
    Anonymous
    Inactive

    I’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,
    Marc

    #829
    Anonymous
    Inactive

    Thank 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;

    #831
    Anonymous
    Inactive

    That’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.

    #832
    Anonymous
    Inactive

    Heya 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.