예제 #1
0
            public Buffer Reply(PeerAddress sender, Buffer requestBuffer, bool complete)
            {
                int i = requestBuffer.BackingBuffer.ReadInt();

                Console.WriteLine("Got {0}.", i);
                var buffer = AlternativeCompositeByteBuf.CompBuffer().WriteInt(i);

                return(new Buffer(buffer));
            }
예제 #2
0
            public Buffer Reply(PeerAddress sender, Buffer requestBuffer, bool complete)
            {
                Console.WriteLine("{0}.", ++_counter);
                Console.WriteLine("Request from {0}.", sender);
                Console.WriteLine("Buffer Size : {0}", Convenient.ToHumanReadable(requestBuffer.Length));

                // server returns just OK if same buffer is returned
                return requestBuffer;
            }
예제 #3
0
            public Buffer Reply(PeerAddress sender, Buffer requestBuffer, bool complete)
            {
                Console.WriteLine("{0}.", ++_counter);
                Console.WriteLine("Request from {0}.", sender);
                Console.WriteLine("Buffer Size : {0}", Convenient.ToHumanReadable(requestBuffer.Length));

                // server returns just OK if same buffer is returned
                return(requestBuffer);
            }
예제 #4
0
 public Buffer Reply(PeerAddress sender, Buffer requestBuffer, bool complete)
 {
     return(CreateTestBuffer());
 }
예제 #5
0
 public Buffer Reply(PeerAddress sender, Buffer requestBuffer, bool complete)
 {
     int i = requestBuffer.BackingBuffer.ReadInt();
     Console.WriteLine("Got {0}.", i);
     var buffer = AlternativeCompositeByteBuf.CompBuffer().WriteInt(i);
     return new Buffer(buffer);
 }
예제 #6
0
 public Buffer Reply(PeerAddress sender, Buffer requestBuffer, bool complete)
 {
     return CreateTestBuffer();
 }
예제 #7
0
 public SendDirectBuilder SetBuffer(Buffer buffer)
 {
     Buffer = buffer;
     return(this);
 }