/// <summary>
      /// Connect to the specified broker
      /// </summary>
      /// <param name="broker">The broker to connect to</param>
      /// <param name="connection">The AMQ connection</param>
      public void Connect(IBrokerInfo broker, AMQConnection connection)
      {
         _stopEvent = new ManualResetEvent(false);
         _protocolListener = connection.ProtocolListener;

         _ioHandler = MakeBrokerConnection(broker, connection);
         // todo: get default read size from config!

         IProtocolDecoderOutput decoderOutput =
            new ProtocolDecoderOutput(_protocolListener);
         _amqpChannel = 
            new AmqpChannel(new ByteChannel(_ioHandler), decoderOutput);

         // post an initial async read
         _amqpChannel.BeginRead(new AsyncCallback(OnAsyncReadDone), this);
      }
예제 #2
0
        /// <summary>
        /// Connect to the specified broker
        /// </summary>
        /// <param name="broker">The broker to connect to</param>
        /// <param name="connection">The AMQ connection</param>
        public void Connect(IBrokerInfo broker, AMQConnection connection)
        {
            _stopEvent        = new ManualResetEvent(false);
            _protocolListener = connection.ProtocolListener;

            _ioHandler = MakeBrokerConnection(broker, connection);
            // todo: get default read size from config!

            IProtocolDecoderOutput decoderOutput =
                new ProtocolDecoderOutput(_protocolListener);

            _amqpChannel =
                new AmqpChannel(new ByteChannel(_ioHandler), decoderOutput);

            // post an initial async read
            _amqpChannel.BeginRead(new AsyncCallback(OnAsyncReadDone), this);
        }
예제 #3
0
 public virtual bool Decode(TCPSession session, PackageBuffer buffer, ProtocolDecoderOutput output)
 {
     return(false);
 }