/// <summary> /// Install a callback handler that will be invoked if the connection is closed. /// </summary> /// <description>The handler is called when the connection is closed no matter if the connection was closed /// by the client or by the server. Any new call to this function will replace the callback handler installed /// by a prior function call.</description> /// <param name="handler">The user provided callback handler</param> /// <exception cref="IedConnectionException">This exception is thrown if there is a connection or service error</exception> public void InstallConnectionClosedHandler(ConnectionClosedHandler handler) { connectionClosedHandler = new InternalConnectionClosedHandler(MyConnectionClosedHandler); userProvidedHandler = handler; IedConnection_installConnectionClosedHandler(connection, connectionClosedHandler, connection); }
/// <summary> /// Install a callback handler that will be invoked if the connection is closed. /// </summary> /// <description>The handler is called when the connection is closed no matter if the connection was closed /// by the client or by the server. Any new call to this function will replace the callback handler installed /// by a prior function call.</description> /// <param name="handler">The user provided callback handler</param> /// <exception cref="IedConnectionException">This exception is thrown if there is a connection or service error</exception> public void InstallConnectionClosedHandler(ConnectionClosedHandler handler) { connectionClosedHandler = new InternalConnectionClosedHandler (MyConnectionClosedHandler); userProvidedHandler = handler; IedConnection_installConnectionClosedHandler (connection, connectionClosedHandler, connection); }
static extern void IedConnection_installConnectionClosedHandler(IntPtr self, InternalConnectionClosedHandler handler, IntPtr parameter);