protected override void Closed(Channel channel, ChannelCloseEventArgs e) { Assert.IsTrue(e.WasClean); Assert.IsFalse(e.WasDenied); if (channel == emitListener) { Done(); } }
protected override void Closed(Channel channel, ChannelCloseEventArgs e) { if (channel == deny) { Assert.IsTrue(e.WasDenied); Assert.IsFalse(e.WasClean); Assert.AreEqual(e.Text, "DENIED"); } else { Assert.IsTrue(e.WasClean); Assert.IsFalse(e.WasDenied); } Done(); }
protected override void Closed(Channel channel, ChannelCloseEventArgs e) { Assert.IsTrue(e.WasClean); Assert.IsFalse(e.WasDenied); Done(); }
static void c_Closed(object sender, ChannelCloseEventArgs e) { Console.WriteLine("Channel is now closed, bye.."); channel = null; }
internal void handleClose(Frame frame, string reason) { if (_state == ChannelState.Closed) { return; } _state = ChannelState.Closed; _ptr = 0; if (_closedInvoker == null) return; ChannelCloseEventArgs e; if (frame == null) { e = new ChannelCloseEventArgs(false, false, reason); } else { bool wasDenied = frame.OpCode == OpCode.Open; bool wasClean = wasDenied ? false : frame.SignalFlag == SignalFlag.End; e = new ChannelCloseEventArgs(frame.ContentType, frame.Payload, wasDenied, wasClean, reason); } _closedInvoker(this, e); }
protected virtual void Closed(Channel channel, ChannelCloseEventArgs e){}