Class PortForwarder

java.lang.Object
edu.wpi.first.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 Details

    • 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 number
      remoteHost - remote IP address / DNS name
      remotePort - remote port number
    • remove

      public static void remove​(int port)
      Stop TCP forwarding on a port.
      Parameters:
      port - local port number