WriteTo() public method

public WriteTo ( RabbitMQ.Util.NetworkBinaryWriter writer ) : void
writer RabbitMQ.Util.NetworkBinaryWriter
return void
Esempio n. 1
0
 public void WriteFrame(Frame frame)
 {
     lock (m_writer)
     {
         frame.WriteTo(m_writer);
         m_writer.Flush();
     }
 }
 public void WriteFrame(Frame frame)
 {
     lock (m_writer)
     {
         m_socket.Client.Poll(m_writeableStateTimeout, SelectMode.SelectWrite);
         frame.WriteTo(m_writer);
         m_writer.Flush();
     }
 }
Esempio n. 3
0
 public void WriteFrame(Frame frame)
 {
     lock (m_writer)
     {
         frame.WriteTo(m_writer);
         //Console.WriteLine("OUTBOUND:");
         //DebugUtil.DumpProperties(frame, Console.Out, 2);
     }
 }
Esempio n. 4
0
        public static void CheckEmptyFrameSize() {
            Frame f = new Frame(CommonFraming.Constants.FrameBody, 0, m_emptyByteArray);
            MemoryStream stream = new MemoryStream();
            NetworkBinaryWriter writer = new NetworkBinaryWriter(stream);
            f.WriteTo(writer);
            long actualLength = stream.Length;

            if (EmptyFrameSize != actualLength) {
                string message =
                    string.Format("EmptyFrameSize is incorrect - defined as {0} where the computed value is in fact {1}.",
                                  EmptyFrameSize,
                                  actualLength);
                throw new ProtocolViolationException(message);
            }
        }
Esempio n. 5
0
        public static void CheckEmptyFrameSize()
        {
            var f      = new Frame(Constants.FrameBody, 0, m_emptyByteArray);
            var stream = new MemoryStream();
            var writer = new NetworkBinaryWriter(stream);

            f.WriteTo(writer);
            long actualLength = stream.Length;

            if (EmptyFrameSize != actualLength)
            {
                string message =
                    string.Format("EmptyFrameSize is incorrect - defined as {0} where the computed value is in fact {1}.",
                                  EmptyFrameSize,
                                  actualLength);
                throw new ProtocolViolationException(message);
            }
        }
 public void WriteFrame(Frame frame)
 {
     lock (m_writer)
     {
         frame.WriteTo(m_writer);
         m_writer.Flush();
         //Console.WriteLine("OUTBOUND:");
         //DebugUtil.DumpProperties(frame, Console.Out, 2);
     }
 }
 public void WriteFrame(Frame frame)
 {
     lock (m_writer)
     {
         frame.WriteTo(m_writer);
         m_writer.Flush();
     }
 }
 public void WriteFrame(Frame frame)
 {
     lock (m_writer)
     {
         m_socket.Client.Poll(m_writeableStateTimeout, SelectMode.SelectWrite);
         frame.WriteTo(m_writer);
         m_writer.Flush();
     }
 }