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

help netreceive find an available TCP port #2129

Open
Ant1r opened this issue Nov 9, 2023 · 0 comments
Open

help netreceive find an available TCP port #2129

Ant1r opened this issue Nov 9, 2023 · 0 comments
Labels
feature suggestion for an enhancement

Comments

@Ant1r
Copy link
Contributor

Ant1r commented Nov 9, 2023

For several years now, [netreceive] accepts the [listen PORTNUMBER( message, which allows to skip the port number argument, and look for an available TCP port at run time.

Unfortunately, two things make this a bit complicated and inelegant:

  • every unsuccessful attempt prints this error to the console:

    netreceive: listen failed: Address already in use (98)

  • there is no patch level feedback on the success or failure of the attempt (so you need to test another way, like with a dedicated [netsend]).

I see a simple solution: why not adding a [try PORTNUMBER( command, which wouldn't print any error but would send -1 to the second outlet (number of open connections) instead?

@umlaeute umlaeute added the feature suggestion for an enhancement label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature suggestion for an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants