Home Forums Support Connect to self

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2265
    Anonymous
    Inactive

    TCPconnection is listening on port 49001, on both LAN ip (10.10.10.1) and loopback (127.0.0.1).

    I’m trying to connect to this server from the same application, by doing

    ConnectionInfo connInfo = new ConnectionInfo(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 49001));

    Result is a
    Connection was closed during establish handshake.

    Same result when I try to connect with 10.10.10.1 instead of the loopback.

    I need my application to be able to be a server AND connect to a server (including my own server).

    #2266
    Anonymous
    Inactive

    .. Making a connection to the server in this application from another application works as it should, by the way. Also on same computer.

    #2268
    Anonymous
    Inactive

    It is not possible for the same application to connect back on itself. This would be completely redundant anyway as your should detect if this is the case and achieve the necessary functionality in your application directly.

    It may be useful however to know that you can trigger packet handlers locally using:

    NetworkComms.TriggerGlobalPacketHandlers();

    and

    Connection.TriggerSpecificPacketHandlers();

    If you have any further questions please feel free to post back.

    Regards,
    Marc

    #2271
    Anonymous
    Inactive

    Thanks for your reply, Marc. I’m not a “trained” programmer so I might have missed some code & design patterns 🙁

    I’ll get working on that – thanks for the local packet handler triggers!

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