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

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

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

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

    client:
    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] 0.0.0.0:0 -> y.y.y.y:10000).
    Destination may not be listening or connect timed out. NetworkCommsDotNet.ConnectionSetupException: Timeout waiting for remoteEndPoint to accept TCP connection.

    #4400
    Anonymous
    Inactive

    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 6 years, 5 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.