Function brane_prx::manage::new_incoming_path
source · pub async fn new_incoming_path(
port: u16,
address: Address,
context: Arc<Context>,
) -> Result<(), RedirectError>
Expand description
Creates a new path incoming to the proxy service.
This will allocate a new static port that an internal service can connect to. Any traffic that then occurs on this port is forwarded and trafficked back to the specified, (probably) internal address.
§Arguments
port
: The port to allocate the new service on. Cannot be in the allocated range.address
: The address of the remote server to forward traffic to.context
: The Context struct that contains things we might need.
§Errors
This function will error if we setup the new tunnel server for some reason; typically, this will be if the port is already in use.