public void onData(TCPClientLoop l, SocketChannel sc, ByteBuffer buf) { l.write(sc, this, buf); ++count; if (Speed.NUM == count) { p("here"); l.shutdownOutput(sc, this); l.close(sc, this); l.st(""); l.stopLoop(); } }
public void onConnect(TCPClientLoop l, SocketChannel sc) { l.write(sc, this, "hello".getBytes()); }