/// <summary>
 /// fire MessageReceived
 /// </summary>
 /// <param name="e"></param>
 private void OnMessageReceived(MessageReceivedEventArgs e)
 {
     if (this.MessageReceived != null) this.MessageReceived(this, e);
 }
Beispiel #2
0
 /// <summary>
 /// OnMessageReceived
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="e"></param>
 protected virtual void OnMessageReceived(IConnection connection, MessageReceivedEventArgs e)
 {
 }
        /// <summary>
        /// OnMessageReceived
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="e"></param>
        protected override void OnMessageReceived(IConnection connection, MessageReceivedEventArgs e)
        {
            base.OnMessageReceived(connection, e);

            int readLength;
            RedisResponse response = null;
            try { response = this._protocol.FindResponse(connection, e.Buffer, out readLength); }
            catch (Exception ex)
            {
                connection.BeginDisconnect(ex);
                e.SetReadlength(e.Buffer.Count);
                return;
            }

            this.OnResponse(response);
            e.SetReadlength(readLength);
        }
Beispiel #4
0
 /// <summary>
 /// fire MessageReceived
 /// </summary>
 /// <param name="e"></param>
 private void OnMessageReceived(MessageReceivedEventArgs e)
 {
     this._host.OnMessageReceived(this, e);
 }
Beispiel #5
0
 /// <summary>
 /// OnMessageReceived
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="e"></param>
 protected virtual void OnMessageReceived(IConnection connection, MessageReceivedEventArgs e)
 {
 }
Beispiel #6
0
 /// <summary>
 /// fire MessageReceived
 /// </summary>
 /// <param name="e"></param>
 private void OnMessageReceived(MessageReceivedEventArgs e)
 {
     this._latestActiveTime = Utils.Date.UtcNow;
     this._host.OnMessageReceived(this, e);
 }