DOFConnectionconnect Method OpenDOF Object Access Library
Open a connection, waiting up to timeout for the connection to be established.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public void connect(
	int timeout
)

Parameters

timeout
Type: SystemInt32
Maximum time to wait, in milliseconds, for the connection to be established. If this time passes without a connection then the routine will throw an exception and the request will be forgotten. Note, however, that the connection may still occur, and the listener notified, if the underlying transport cannot cancel the connection request. Must be >= 0.

We recommend 30 seconds for Type.POINT connections.

Exceptions

ExceptionCondition
DOFErrorException This is thrown if the connection times out or if any other error occurs. Many different exception types may be thrown depending on the specific failure: DOFErrorException, DOFSecurityException or DOFAuthenticationException.
DOFException
Remarks

Open a connection, waiting up to timeout for the connection to be established. If the connection is already established then it will immediately return. Note that the StateListener s reflect the actual state of the connection, where this routine establishes a desired state.

For example, if the connection is already connected and this routine is called then the listener will not be called - it would have already been told of the previous connect. This means that the actual state of the connection is known to either the listener or by directly asking the DOFConnection for its current state.

Will also start any related server and open any related connection.

See Also

Reference