/// <summary> /// The OnSessionTxAdmMessage callback is invoked by a session /// when it is ready to dispatch an administrative message to the /// peer session it's interacting with. /// </summary> /// <param name="session"> /// The IVfxFixSession implementation that is issuing the /// callback to the handler. /// </param> /// <param name="msg"> /// The administrative message that the session wants to have /// sent to its corresponding peer session. /// </param> public void OnSessionTxAdmMessage(IVfxFixSession session, FixMessage msg) { // REC: Forward the admin message to the application: _fixApplication.OnSessionTxAdmMessage(_appSession, msg); // REC: Send the admin message to the peer session: _ipcEndpoint.Send(null, new VfxMsgBlock(msg.ToString())); }
/// <summary> /// The OnSessionTxAdmMessage callback is invoked by a session /// when it is ready to dispatch an administrative message to the /// peer session it's interacting with. /// </summary> /// <param name="session"> /// The IVfxFixSession implementation that is issuing the /// callback to the handler. /// </param> /// <param name="msg"> /// The administrative message that the session wants to have /// sent to its corresponding peer session. /// </param> public void OnSessionTxAdmMessage(IVfxFixSession session, FixMessage msg) { if (_mapAppSessions.ContainsKey(session.InstanceId)) { IVfxFixAppSession appSession = _mapAppSessions[session.InstanceId]; _application.OnSessionTxAdmMessage(appSession, msg); // REC: Locate the IPC session identifier of the IPC session // that is associated with the service that is generating the // event and use that to send the message to the peer: if (_mapFixToIpc.ContainsKey(session.InstanceId)) { string ipcIdentifier = _mapFixToIpc[session.InstanceId]; _endpoint.Send(ipcIdentifier, new VfxMsgBlock(msg.ToString())); } } }