Beispiel #1
0
        protected override void Open(Channel channel, ChannelEventArgs e)
        {
            Assert.AreEqual(channel, open);
			Assert.AreEqual(e.Text, "TOKEN");
            channel.Close();
        }
 protected override void Open(Channel channel, ChannelEventArgs e)
 {
     if (channel == closingChannel) {
         channel.Close(Message);
     }
 }
        protected override void Signal(Channel channel, ChannelEventArgs e)
        {
			Assert.AreEqual(e.Text, Message);
            channel.Close();
        }
Beispiel #4
0
 static void c_Data(object sender, ChannelEventArgs e)
 {
     Console.WriteLine("Received data: " + e.Text);
     channel.Close();
 }
Beispiel #5
0
 protected override void Open(Channel channel, ChannelEventArgs e)
 {
     channel.Send(payload);
 }
Beispiel #6
0
 protected override void Open(Channel channel, ChannelEventArgs e)
 {
     channel.Emit("ping");
 }
Beispiel #7
0
 static void c_Open(object sender, ChannelEventArgs e)
 {
     Console.WriteLine("Channel is now open: " + e.Text);
     channel.Send("Hello world");
 }
Beispiel #8
0
 protected override void Open(Channel channel, ChannelEventArgs e)
 {
     for (int i = 0; i < 1000; i++) {
         channel.Send(payload);
     }
 }
Beispiel #9
0
        internal void handleSignal(Frame frame)
        {
            if (_signalInvoker == null)
                return;

            ChannelEventArgs e;
            e = new ChannelEventArgs(frame.ContentType,
                                     frame.Payload);
            _signalInvoker(this, e);
        }
Beispiel #10
0
        internal void handleOpen(Frame frame)
        {

            if (_state == ChannelState.Closing) {
                // User has called close before it was open. Send
                // the pending ENDSIG.
                Frame end = Frame.Create(_ptr, SignalFlag.End, coutro, outro);
                outro = null;
                _connection.Send(end);
                return;
            }

            _state = ChannelState.Open;

            if (_openInvoker == null)
                return;

            ChannelEventArgs e;
            e = new ChannelEventArgs(frame.ContentType, frame.Payload);

            _openInvoker(this, e);
        }
Beispiel #11
0
 protected virtual void Signal(Channel channel, ChannelEventArgs e){}
Beispiel #12
0
 protected virtual void Open(Channel channel, ChannelEventArgs e){}