Archived

This topic is now archived and is closed to further replies.

HUSSAR

Which port should I use and how can I list them?

Recommended Posts

I used SimConnect to run Active Sky X on a client computer using Port 500 and I would like to configure a few other programs using SimConnect but I am unsure as to what other ports I can define for the programs to use. I tried to find the ports listed in the cmd prompt using the following:netstat

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>I used SimConnect to run Active Sky X on a client computer>using Port 500 and I would like to configure a few other>programs using SimConnect but I am unsure as to what other>ports I can define for the programs to use.Why do they need to use different ports? Just use SimConnect on whatever port you have currently defined to be accepted. 500 is merely a nominal choice, it isn't a "rule". On the FS PC, FSX normally chooses one at random and every SimConnect application on that PC uses it automatically. I don't think adding more ports than necessary is good for FSX performance either. I has enough to do without monitoring more than it needs to.RegardsPete

Share this post


Link to post
Share on other sites

Oh so it is that easy? I thought that I had to define a port for each application. One port makes it easy, cannot wait to give it a try.Thanks Pete.

Share this post


Link to post
Share on other sites

"On the FS PC, FSX normally chooses one at random and every SimConnect application on that PC uses it automatically".By that you mean that "adding a program" under the Exceptions tab in Windows Firewall will result in FSX/PC using port 500 as specified in SimConnect.CFG, is that correct?Thanks,

Share this post


Link to post
Share on other sites

<Not quite, the server side of SimConnect is controlled by the SimConnect.XML file, SimConnect.CFG configures the client side. Pete was referring to the fact that FS will auto-select an available port and write the value its currently using into the registry, but this port is only configured for local client connections (ie clients running on the same machine as FSX), to enable remote clients you still have to edit the SimConnect.XML file and manually select a port number to use for global(ie remote) connections. And, if you are using SP2/Acceleration, and your clients were written against the SP2/Acceleration version of the SDK, you also have the option of using Named Pipes, but that's really most useful for local clients (bypasses the TCP/IP Stack for local connections).

Share this post


Link to post
Share on other sites

To take this explanation a step further...When using TCP/IP, the "server" sits and "listens" on a specific port. The "client" attempts it's initial connection by "talking" on the same specific port. When the "server" accepts the connection from the "client", the server "shifts" the client to another port, so that the original port remains open for "listening".The internet is a perfect example. All web site servers listen to port 80 by default (can be changed). Once a user pulls up a web site, it's shifted off to an empty port (usually above the 16k port number range) and fed the HTML from the server.Since SimConnect is the server on the system running FSX, it needs exactly one port to service ALL requests. All clients should be configured to contact SimConnect via the same port.

Share this post


Link to post
Share on other sites

><<>By that you mean that "adding a program" under the Exceptions>tab in Windows Firewall will result in FSX/PC using port 500>as specified in SimConnect.CFG, is that correct?>>>>>Not quite, the server side of SimConnect is controlled by the>SimConnect.XML file, SimConnect.CFG configures the client>side. Pete was referring to the fact that FS will auto-select>an available port and write the value its currently using into>the registry, but this port is only configured for local>client connections (ie clients running on the same machine as>FSX), to enable remote clients you still have to edit the>SimConnect.XML file and manually select a port number to use>for global(ie remote) connections. And, if you are using>SP2/Acceleration, and your clients were written against the>SP2/Acceleration version of the SDK, you also have the option>of using Named Pipes, but that's really most useful for local>clients (bypasses the TCP/IP Stack for local connections).>>Tim and Ed,Thanks for the input. Tim, you mentioned that I need to edit SimConnect,XML (which is fine) and manually select a port number, so would say port #501 be ok?**EDIT**I am going to carefully re-read your posts and determine the best course of action. I am sure it will all work out fine.

Share this post


Link to post
Share on other sites

AN old thread I know however how do I configure simconnect.cfg for applications which have different requirementsegASE I have on port 500 maz receive 4096 and disablenagel=0REX needs a port at least 1025 or higher, max receive 8192 nd disablenagel=1do I use simconnect for the first port, then simconnect.1 for the second port etc?

Share this post


Link to post
Share on other sites

Why do you think the different client apps need different settings? You can have multiple clients connecting to the same port number (up to 64 with the default settings). And I would just always use 8192 as the Max Receive size (since that's the max packet size for SimConnect). Also, most clients only support connecting via the SimConnect.0 section of the SimConnect.cfg file (which defaults to the local connection if there is no .CFG file). I've never quite figured out what the Nagle thing is all about, and usually just set it to disabled.If you really need the different settings, the best way to handle that would be to place a SimConnect.cfg file in the same directory as the client apps .EXE file (ie one SimConnect.cfg for each addon) each with a SimConnect.0 section with specific settings.Tim

Share this post


Link to post
Share on other sites
I've never quite figured out what the Nagle thing is all about, and usually just set it to disabled.Tim
Borrowed this from the web;
Definition: The Nagle algorithm, named after engineer John Nagle, was designed to reduce LAN and other network congestion from TCP applications. TCP implementations on UNIX began using the Nagle algorithm in the 1980s, and the algorithm remains a standard feature of TCP implementations today. The Nagle algorithm works by aggregating data on the sending side of TCP applications. It accumulates sequences of small messages into larger TCP packets before data reaches the wire, thereby preventing the generation of unnecessarily large numbers of small packets. When the Nagle algorithm works as designed, TCP applications utilize network resources more efficiently. Applications can enable or disable the Nagle algorithm with the TCP_NODELAY socket option. Windows, Linux, and Java systems all normally enable the Nagle algorithm by default. However, in some cases, the Nagle algorithm has a negative effect on application performance, so network application engineers may prefer to disable it.

Share this post


Link to post
Share on other sites