Search in sources :

Example 1 with NioClient

use of org.jgroups.blocks.cs.NioClient in project JGroups by belaban.

the class NioServerTest method init.

@BeforeMethod
protected void init() throws Exception {
    srv = new NioServer(Util.getLoopback(), 0);
    srv.sendBufferSize(send_buf_size).receiveBufferSize(recv_buf_size);
    srv.start();
    client = new NioClient(null, 0, Util.getLoopback(), ((IpAddress) srv.localAddress()).getPort());
    client.sendBufferSize(send_buf_size).receiveBufferSize(recv_buf_size);
    client.maxSendBuffers(1000);
    client.start();
    for (int i = 0; i < senders.length; i++) {
        senders[i] = new Sender(counter, latch, client);
        senders[i].start();
    }
}
Also used : NioServer(org.jgroups.blocks.cs.NioServer) IpAddress(org.jgroups.stack.IpAddress) NioClient(org.jgroups.blocks.cs.NioClient) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

NioClient (org.jgroups.blocks.cs.NioClient)1 NioServer (org.jgroups.blocks.cs.NioServer)1 IpAddress (org.jgroups.stack.IpAddress)1 BeforeMethod (org.testng.annotations.BeforeMethod)1