/// <summary> /// The HandleTcpConnector_Failure event handler is invoked /// in response to the connector not being able to establish /// a connection to the peer system. /// </summary> /// <param name="sender"> /// The connector that is dispatching the event. /// </param> /// <param name="args"> /// The event details that are associated with the event. /// </param> private void HandleTcpConnector_Failure(object sender, VfxTcpConnectorEventArgs args) { // REC: Translate the connector's failure notification // into the corresponding IPC event and dispatch it: EventHandler <VfxIpcEventArgs> tmpDispatch = EventDispatch; if (tmpDispatch != null) { VfxIpcEventArgs tmpArgs = new VfxIpcEventArgs(VfxIpcEventTypes.Event_Connect_Failure); tmpDispatch(this, tmpArgs); } }
/// <summary> /// The HandleTcpConnector_Dispatch event handler is invoked /// in response to the events from the connector the endpoint /// is using to establish a connection. /// </summary> /// <param name="sender"> /// The VfxTcpConnector instance that is dispatching the /// event to the endpoint. /// </param> /// <param name="args"> /// The details of the event being dispatched. /// </param> private void HandleTcpConnector_Dispatch(object sender, VfxTcpConnectorEventArgs args) { switch (args.EventType) { case VfxTcpConnectorEventTypes.Event_Connect_Success: HandleTcpConnector_Success(sender, args); break; case VfxTcpConnectorEventTypes.Event_Connect_Failure: HandleTcpConnector_Failure(sender, args); break; } }