Home Forums Support Set a Port?

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

    Hi,

    How can I set the port of the server static? (e.g. as 12345)

    I hope someone can help me,

    91378246.

    #1416
    Anonymous
    Inactive

    Heya. Many thanks for your interest in our network library and welcome to our forums. Please use the following syntax:

    try
    {
        IPAddress ipAddress = IPAddress.Parse("127.0.0.1");
        IPEndPoint endPointToUse = new IPEndPoint(ipAddress, 12345);
        TCPConnection.StartListening(endPointToUse, false);
    }
    catch (CommsSetupShutdownException)
    {
        Console.WriteLine("The requested port '12345' was already in use.");
    }

    Regards,
    Marc

    #1417
    Anonymous
    Inactive

    Hi,

    thank you for your fast answere. But now I have another question.
    This server worked perfectly in my home network. But how can I make it work worldwide?

    yours sincerely,
    91378246.

    #1419
    Anonymous
    Inactive

    You need to allow access to your PC from the internet:

    http://www.nch.com.au/kb/10046.html

    Marc

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