Previous ION Java User's Guide: ION Java Class and Method Reference Next

connect()

The connect() method establishes a connection between the client and the ION Server. The client and the server make validity checks and the communication protocol is established. If hostname and port information for the ION Server are supplied, the connection type is set automatically to "BEST_CON". See setConnectionMethod() for details on setting other connection types.

Syntax

public void connect(String sHostname)

public void connect(String sHostname, int iPort)

Arguments

sHostname

The name of the host that the ION Server is running on. If the class is being created as part of a Java applet, most web browsers require that the host name be the same host that is serving the applet. If the connection type is either "SOCK_CON" or "BEST_CON", this argument specifies the host on which the ION Server is running.

iPort

The port number to use when connecting to the ION Server. If this number is not provided the default port number is used. If the connection type is either "SOCK_CON" or "BEST_CON", this argument specifies the port on which the ION Server is running.

Exceptions

IOException, UnknownHostException, IONLicenseException

  IDL Online Help (March 06, 2007)