net.sf.xenqtt.test
Class NonBlockingTcpEchoClient
java.lang.Object
net.sf.xenqtt.test.NonBlockingTcpEchoClient
public final class NonBlockingTcpEchoClient
- extends Object
This client sends data to a TCP echo server using blocking IO. Data is in the following format:
- First 2 bytes: big endian length of the remaining paylaod
- Remaining bytes: payload
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
start
public void start()
newConnection
public void newConnection(SocketChannel channel)
throws IOException
- Throws:
IOException
send
public final void send(ByteBuffer buffer)
Copyright © 2013. All Rights Reserved.