use of zmq.msg.MsgAllocatorDirect in project jeromq by zeromq.
the class TestZMQ method testSocketMsgAllocator.
@Test
public void testSocketMsgAllocator() {
final Socket socket = ctx.socket(SocketType.STREAM);
assertThat(socket, notNullValue());
MsgAllocator allocator = new MsgAllocatorDirect();
boolean set = socket.setMsgAllocator(allocator);
assertThat(set, is(true));
// TODO
socket.close();
}
use of zmq.msg.MsgAllocatorDirect in project jeromq by zeromq.
the class OptionsTest method testAllocator.
@Test
public void testAllocator() {
options.setSocketOpt(ZMQ.ZMQ_MSG_ALLOCATOR, new MsgAllocatorDirect());
assertThat(options.getSocketOpt(ZMQ.ZMQ_MSG_ALLOCATOR), is((Object) options.allocator));
}
Aggregations