Chameleon and Iguana Plugin C# Class Libraries

Destination.Connect Method 

Connects to an Iguana To-Plugin channel component as a destination plugin.

[Visual Basic]
Public Sub Connect( _
   ByVal HostName As String, _
   ByVal PortNumber As Integer, _
   ByVal ChannelName As String _
)
[C#]
public void Connect(
   string HostName,
   int PortNumber,
   string ChannelName
);

Parameters

HostName
Iguana machine hostname or IP address (typically 'localhost' if the plugin and Iguana are running on the same machine).
PortNumber
Iguana Plugin Communication Server port number (typically 6123).
ChannelName
Iguana channel name.

Remarks

Normally, this method is called as the plugin starts and is ready to receive data from Iguana or if Iguana has disconnected from the plugin (for example, after returning from a call to WaitForDisconnect).

It may not be called from within an event handler (for example, may not be called from within the Disconnected handler).

If a connection is not established within the timeout period specified by ConnectTimeout, an exception will be thrown. The default timeout period of 5000 milliseconds should suffice for most plugins, and should only be adjusted if connection timeouts are observed.

One common point of confusion with users is the choice of port number for this call. This must be the port number for the Plugin Communication Server, which is typically 6123, not the LLP port for the particular plugin channel.

Throws: Function throws an exception upon connection failure or timeout, or if called from within an event handler.

See Also

Destination Class | iNTERFACEWARE.Iguana.Plugin Namespace