port4me {port4me} | R Documentation |
Gets a Personalized TCP Port that can be Opened by the User
Description
Gets a Personalized TCP Port that can be Opened by the User
Usage
port4me(
tool = NULL,
user = NULL,
prepend = NULL,
include = NULL,
exclude = NULL,
skip = NULL,
list = NULL,
test = NULL,
max_tries = 65535L,
must_work = TRUE
)
Arguments
tool |
(optional) The name of the software tool for which a port should be generated. |
user |
(optional) The name of the user.
Defaults to |
prepend |
(optional) An integer vector of ports to always consider. |
include |
(optional) An integer vector of possible ports to return.
Defaults to |
exclude |
(optional) An integer vector of ports to exclude. |
skip |
(optional) Number of non-excluded ports to skip.
Defaults to |
list |
(optional) Number of ports to list. |
test |
(optional) A port to check whether it can be opened or not. |
max_tries |
Maximum number of ports checked, before giving up.
Defaults to |
must_work |
If TRUE, then an error is produced if no port could
be found. If FALSE, then |
Value
A port, or a vector of ports.
If test
is given, then TRUE is if the port can be opened, otherwise FALSE.
See Also
The default values of the arguments can be controlled via environment variables. See port4me.settings for details.
Examples
port <- port4me()
print(port)
port <- port4me(tool = "rstudio")
print(port)
port <- port4me("rstudio") ## short for the above
print(port)
ports <- port4me(tool = "rstudio", list = 5L)
print(ports)
avail <- port4me(test = 4321)
print(avail)