Home Forums Support problem with sending messages between client-server over the internet

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4387

    `I have one server in NewYork ip: x.x.x.x
    And I have one client in London ip: y.y.y.y

    How to make connection between server – client.
    What is the bast way to communicate?
    My code:

    NetworkComms.SendObject(“Message”, “y.y.y.y”, 10000, “hello”);

    NetworkComms.AppendGlobalIncomingPacketHandler<string>(“Message”, PrintIncomingMessage);
    Connection.StartListening(ConnectionType.TCP, new IPEndPoint(IPAddress.Parse(“x.x.x.x”), 10000));

    The server always got exception:
    Error during TCP connection establish with destination ([TCP-E-S] -> y.y.y.y:10000).
    Destination may not be listening or connect timed out. NetworkCommsDotNet.ConnectionSetupException: Timeout waiting for remoteEndPoint to accept TCP connection.


    The code looks incorrect, you send a message to ‘y.y.y.y’, yet the StartListening method, listens to messages recieved on (!not from!) ‘x.x.x.x’. I suspect StartListening is executed on ‘y.y.y.y’ and this is what causes the problem.

    • This reply was modified 8 years, 1 month ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.