EventEngine - wait for messages from the underlying C++ code. When available get them and deliver them via callback to our client through the ISessionReceiver interface. This class consumes the thread that calls the Run() function.
コード例 #1
0
ファイル: sessionreceiver.cs プロジェクト: tonyli71/qpid
        /// <summary>
        /// Constructor for the server.
        /// </summary>
        /// <param name="session">The Session whose messages are collected.</param>
        /// <param name="callback">The user function call with each message.</param>
        ///
        public CallbackServer(Session session, ISessionReceiver callback)
        {
            ee = new EventEngine(session, callback);

            new System.Threading.Thread(
                new System.Threading.ThreadStart(ee.Open)).Start();
        }
コード例 #2
0
        /// <summary>
        /// Constructor for the server.
        /// </summary>
        /// <param name="session">The Session whose messages are collected.</param>
        /// <param name="callback">The user function call with each message.</param>
        /// 
        public CallbackServer(Session session, ISessionReceiver callback)
        {
            ee = new EventEngine(session, callback);

            new System.Threading.Thread(
                new System.Threading.ThreadStart(ee.Open)).Start();
        }