예제 #1
0
 /// <summary>
 /// The OnSessionTxAppMessage callback is invoked by a session
 /// when it is ready to dispatch an application 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 application message that the session wants to have sent
 /// to its corresponding peer session.
 /// </param>
 public void OnSessionTxAppMessage(IVfxFixSession session, FixMessage msg)
 {
     // REC: Forward the app message to the application:
     _fixApplication.OnSessionTxAppMessage(_appSession, msg);
     // REC: Send the app message to the peer system:
     _ipcEndpoint.Send(null, new VfxMsgBlock(msg.ToString()));
 }
예제 #2
0
        /// <summary>
        /// The OnSessionTxAppMessage callback is invoked by a session
        /// when it is ready to dispatch an application 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 application message that the session wants to have sent
        /// to its corresponding peer session.
        /// </param>
        public void OnSessionTxAppMessage(IVfxFixSession session, FixMessage msg)
        {
            if (_mapAppSessions.ContainsKey(session.InstanceId))
            {
                IVfxFixAppSession appSession = _mapAppSessions[session.InstanceId];
                _application.OnSessionTxAppMessage(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()));
                }
            }
        }