Class TcpConnectorFactory

java.lang.Object
com.jme3.network.base.TcpConnectorFactory
All Implemented Interfaces:
ConnectorFactory

public class TcpConnectorFactory extends Object implements ConnectorFactory
Creates TCP connectors to a specific remote address.
Author:
Paul Speed
  • Constructor Details

    • TcpConnectorFactory

      public TcpConnectorFactory(InetAddress remoteAddress)
      Creates a factory that connects to the specified remote address.
      Parameters:
      remoteAddress - the remote address for created TCP connectors
  • Method Details

    • createConnector

      public Connector createConnector(int channel, int port) throws IOException
      Description copied from interface: ConnectorFactory
      Creates a connector for the specified channel and remote port.
      Specified by:
      createConnector in interface ConnectorFactory
      Parameters:
      channel - the logical channel index
      port - the remote port to connect to
      Returns:
      the created connector
      Throws:
      IOException - if the connector cannot be created