Example #1
0
        public virtual object Complete(ProtoState state)
        {
            var res = state.Complete();

            OnResponse?.Invoke(this, state);
            AllDone.Reset();
            return(res);
        }
Example #2
0
 private void Receive(ProtoState state)
 {
     try
     {
         state.WorkSocket.BeginReceive(state.Buffer, 0, Config.BufferSize, 0,
                                       ReceiveCallback, state);
     }
     catch (Exception e)
     {
         Abort(state, e);
     }
 }
Example #3
0
 public override object Complete(ProtoState state)
 {
     ConnectDone.Reset();
     SendDone.Reset();
     return(base.Complete(state));
 }
Example #4
0
 public override void Abort(ProtoState state, Exception e)
 {
     ConnectDone.Reset();
     SendDone.Reset();
     base.Abort(state, e);
 }
Example #5
0
 public virtual void Abort(ProtoState state, Exception e)
 {
     state?.Abort(e);
     AllDone.Reset();
     OnAbort?.Invoke(this, state, e);
 }