On 1/8/2023 11:35 AM, akshay kulkarni wrote:
Dear members,
I am using free_port from the netstat package, but
it is returning only one value:
library(netstat)
free_port()
[1] 14415
This is occurring in both Linux and Windows. Previously it used to output
thousands of ports. What has gone wrong?
thanking you,
Yours sincerely,
AKSHAY M KULKARNI
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
I haven't used that function before, and I don't know what you
previously experienced, but if you set the parameter random=TRUE you
will get a different port on each invocation
free_port(random=TRUE)
Hope this is helpful,
Dan
--
Daniel Nordlund
Port Townsend, WA USA
--
This email has been checked for viruses by Avast antivirus software.
www.avast.com
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.