public BlockingSocketProcessor(string host, int port, IProtocolListener protocolListener) { _host = host; _port = port; _protocolListener = protocolListener; _byteChannel = new ByteChannel(this); }
/// <summary> /// /// </summary> /// <param name="listener"></param> public void AddListener(IProtocolListener listener) { if (!this.listenerList.Contains(listener)) { listenerList.Add(listener); } }
/// <summary> /// Adds a listener to the friend events /// </summary> /// <param name="listener"></param> internal void AddListener(IProtocolListener listener) { if (!this.listeners.Contains(listener)) { this.listeners.Add(listener); } }
public ProtocolDecoderOutput(IProtocolListener protocolListener) { if ( protocolListener == null ) throw new ArgumentNullException("protocolListener"); _protocolListener = protocolListener; }
public ProtocolDecoderOutput(IProtocolListener protocolListener) { if (protocolListener == null) { throw new ArgumentNullException("protocolListener"); } _protocolListener = protocolListener; }
/// <summary> /// Initialize a new instance /// </summary> /// <param name="stream">Underlying network stream</param> /// <param name="protocolListener">Protocol listener to report exceptions to</param> public IoHandler(Stream stream, IProtocolListener protocolListener) { if ( stream == null ) throw new ArgumentNullException("stream"); if ( protocolListener == null ) throw new ArgumentNullException("protocolListener"); // initially, the stream at the top of the filter // chain is the underlying network stream _topStream = stream; _protocolListener = protocolListener; _readBufferSize = DEFAULT_BUFFER_SIZE; }
/// <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); }
/// <summary> /// Initialize a new instance /// </summary> /// <param name="stream">Underlying network stream</param> /// <param name="protocolListener">Protocol listener to report exceptions to</param> public IoHandler(Stream stream, IProtocolListener protocolListener) { if (stream == null) { throw new ArgumentNullException("stream"); } if (protocolListener == null) { throw new ArgumentNullException("protocolListener"); } // initially, the stream at the top of the filter // chain is the underlying network stream _topStream = stream; _protocolListener = protocolListener; _readBufferSize = DEFAULT_BUFFER_SIZE; }
/// <summary> /// /// </summary> /// <param name="o"></param> public void Remove(IProtocolListener o) { this.arrayList.Remove(o); }
/// <summary> /// /// </summary> /// <param name="index"></param> /// <param name="o"></param> public void Insert(int index, IProtocolListener o) { this.arrayList.Insert(index, o); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> public int IndexOf(IProtocolListener o) { return this.arrayList.IndexOf(o); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> public bool Contains(IProtocolListener o) { return this.arrayList.Contains(o); }
/// <summary> /// /// </summary> /// <param name="listener"></param> public void RemoveListener(IProtocolListener listener) { listenerList.Remove(listener); }
public BlockingSocketTransport(string host, int port, AMQConnection connection) { _host = host; _port = port; _protocolListener = connection.ProtocolListener; }
/// <summary> /// Adds a listener to the friend events /// </summary> /// <param name="listener"></param> internal void AddListener(IProtocolListener listener) { if (!this.listeners.Contains(listener)) this.listeners.Add(listener); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> public bool Contains(IProtocolListener o) { return(this.arrayList.Contains(o)); }
/// <summary> /// Remove a listener from the protocol. /// </summary> /// <param name="listener"></param> public void RemoveListener(IProtocolListener listener) { this.protocolServer.RemoveListener(listener); }
/// <summary> /// Add a listener to the protocol. The listeners receive events triggered by the plugin. /// </summary> /// <param name="listener"></param> public void AddListener(IProtocolListener listener) { this.protocolServer.AddListener(listener); }
/// <summary> /// Removes a listener from the friend events /// </summary> /// <param name="listener"></param> internal void RemoveListener(IProtocolListener listener) { this.listeners.Remove(listener); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> public int IndexOf(IProtocolListener o) { return(this.arrayList.IndexOf(o)); }
public ProtocolWriter(IProtocolWriter protocolWriter, IProtocolListener protocolListener) { _protocolWriter = protocolWriter; _protocolListener = protocolListener; }
/// <summary> /// /// </summary> /// <param name="listener"></param> public void AddListener(IProtocolListener listener) { if (!this.listenerList.Contains(listener)) listenerList.Add(listener); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> public int Add(IProtocolListener o) { return this.arrayList.Add(o); }
/// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> public int Add(IProtocolListener o) { return(this.arrayList.Add(o)); }