[R] free_port returning only one port...

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Sun Jan 8 21:09:43 CET 2023


dear Dan,
                   Yes, i just read the documentation...Previously i was using it with RSelenium package and never got to know that the argument random defaulted to FALSE. I was just using it blindly...only now I got to know that you must set random = TRUE to get different values across invocations...
Thanks anyways...

Thanking you,
Yours sincerely
AKSHAY M KULKARNI

________________________________
From: Daniel Nordlund <djnordlund using gmail.com>
Sent: Monday, January 9, 2023 1:35 AM
To: akshay kulkarni <akshay_e4 using hotmail.com>; R help Mailing list <r-help using r-project.org>
Subject: Re: [R] free_port returning only one port...

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
>

 thousands of ports. What has gone wrong?
>
> thanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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<http://www.avast.com>

	[[alternative HTML version deleted]]



More information about the R-help mailing list