DOFConnectionreconnect Method OpenDOF Object Access Library
Reopen a connection, waiting up to timeout for the connection to be reestablished.

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

C#
public void reconnect(
	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

Reopen a connection, waiting up to timeout for the connection to be reestablished. If the connection is already established then it will immediately return. This should only be used when a successfully established connection was terminated but the connection is still desired (disconnect has not yet been called).

Note that the listeners 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 restart any related server and reopen any related connection.

See Also

Reference