Search in sources :

Example 1 with Client

use of tezc.core.client.Client in project tezcRaft by tezc.

the class ClientTest method main.

public static void main(String[] args) {
    try {
        Thread.sleep(2000);
        Client client = new Client(null, "cluster1", "client0", "group0");
        client.addTransport(new TransportRecord("tcp", "127.0.0.1", 9090));
        client.start();
        Thread.sleep(8000);
        ByteBuffer bbuf = ByteBuffer.allocate(22);
        bbuf.flip();
        client.sendRequest(false, 1, bbuf);
        Thread.sleep(100000);
    } catch (Exception e) {
    }
}
Also used : TransportRecord(tezc.core.record.TransportRecord) Client(tezc.core.client.Client) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 Client (tezc.core.client.Client)1 TransportRecord (tezc.core.record.TransportRecord)1