Example #1
0
 public void HandleChannelOpen(Object sender, EAnpChannelOpenEventArgs args)
 {
     Tell("Channel opened");
     EAnpChannel c = args.Channel;
     if (!c.IsOpen()) return;
     c.OnIncomingQuery += HandleIncomingQuery;
     c.OnIncomingEvent += HandleIncomingEvent;
     c.OnClose += HandleChannelClosed;
     ExecNextCmd(c);
 }
Example #2
0
        /// <summary>
        /// Called when a channel has been opened.
        /// </summary>
        public static void HandleChannelOpen(Object sender, EAnpChannelOpenEventArgs args)
        {
            EAnpChannel c = args.Channel;
            if (!c.IsOpen()) return;

            // Register the channel.
            c.OnClose += HandleChannelClose;
            WmEAnpChannel wc = new WmEAnpChannel(c);
            m_channelTree[c] = wc;
        }