public class SimpleTcpClientExample {
public static void main(String[] args) throws Throwable {
final SimpleTcpClient client = new SimpleTcpClient("localhost", 9900, new StringLineDecoder(), new StringLineEncoder(), new PipelineClientHandler());
long start = System.currentTimeMillis();
TcpConnection c = client.connect().get();
long end = System.currentTimeMillis();
System.out.println("connection 0 creating time is " + (end - start));
System.out.println("current conn id: " + c.getId());
c.send("hello client 1", new MessageReceivedCallback() {