Connect Method

Class

Agent.

Action

Connects to an agent on the given machine by using the specified host and port.

If no agent is running or the agent cannot be reached on that machine, an exception is thrown.

If the specified host is the localhost, the agent is started.

After the connection to this agent is established for the first time, all agent options are reset to their default values by calling Agent.ResetOptions().

Syntax

C#
Connect (host, [port])
VB
Connect (host, [port])
Variable Description
host The host of the Open Agent. String.
port Optional: The port of the Open Agent. If a port is not specified, the default port is used. This port is the information service port with the default value of 22901. For example, to connect the agent to a different information service port, type Agent.Connect("myRemoteMachine", portnumber)

If you are connected to a remote agent, you can connect to your local agent by typing Agent.Connect("localhost"). Integer.