Package edu.wpi.first.wpiutil.net
Class PortForwarder
- java.lang.Object
-
- edu.wpi.first.wpiutil.net.PortForwarder
-
public final class PortForwarder extends Object
Forward ports to another host. This is primarily useful for accessing Ethernet-connected devices from a computer tethered to the RoboRIO USB port.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidadd(int port, String remoteHost, int remotePort)Forward a local TCP port to a remote host and port.static voidremove(int port)Stop TCP forwarding on a port.
-
-
-
Method Detail
-
add
public static void add(int port, String remoteHost, int remotePort)Forward a local TCP port to a remote host and port. Note that local ports less than 1024 won't work as a normal user.- Parameters:
port- local port numberremoteHost- remote IP address / DNS nameremotePort- remote port number
-
remove
public static void remove(int port)
Stop TCP forwarding on a port.- Parameters:
port- local port number
-
-