Class TcpTransport

java.lang.Object
com.trdp.network.TcpTransport
All Implemented Interfaces:
AutoCloseable

public class TcpTransport extends Object implements AutoCloseable
  • Constructor Details

    • TcpTransport

      public TcpTransport(String host, int port) throws IOException
      Throws:
      IOException
    • TcpTransport

      public TcpTransport(String host, int port, InetAddress bindAddress, int trafficClass) throws IOException
      Creates a TCP transport with custom socket options.
      Parameters:
      host - the remote host to connect to
      port - the remote port to connect to
      bindAddress - the local address to bind to, or null for any local address
      trafficClass - the IP traffic class byte (use UdpTransport.qosToTrafficClass(int) to convert from QoS), or 0 to leave at OS default
      Throws:
      IOException - if connection fails
  • Method Details