Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default ports for federates. #402

Open
Jakio815 opened this issue Mar 26, 2024 · 1 comment
Open

Default ports for federates. #402

Jakio815 opened this issue Mar 26, 2024 · 1 comment

Comments

@Jakio815
Copy link
Collaborator

Jakio815 commented Mar 26, 2024

According to the handbook, it says that the federate's default port uses 15045 such as the RTI when there is no specified port.

However, I tested and saw the code that there is no default value for the federate, when the port is not specified.
If the port is not specified, the OS assigns it, and we get the assigned port using getsockname()
.
So, do we want default ports or not?

BTW, some port related issues, I see that #146 is not fixed.

@edwardalee
Copy link
Contributor

You are right. The handbook needs to be updated. Federates should not have default ports (it wouldn't make sense anyway because they would all collide). There is another error on the same page, which says:

The port is ignored in centralized mode because all communication is routed through the RTI, but in decentralized mode it will specify the port on which a socket server listens for incoming connections from other federates.

This is not quite right. If there is a physical connection, then the communication is not routed through the RTI and the destination federate again acquires a port from the OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants