public static Context context(int ioThreads)
    {
        return new Context(ioThreads);
    }
@Test
    public void testSocketSendRecvArray()
    {
        Context context = ZMQ.context(1);

        Socket push = context.socket(SocketType.PUSH);
        Socket pull = context.socket(SocketType.PULL);

        boolean rc = pull.setReceiveTimeOut(50);
        assertThat(rc, is(true));
        int port = push.bindToRandomPort("tcp://127.0.0.1");
        rc = pull.connect("tcp://127.0.0.1:" + port);
        assertThat(rc, is(true));

        byte[] data = "ABC".getBytes(ZMQ.CHARSET);

        rc = push.sendMore("DEF");
        assertThat(rc, is(true));
        rc = push.send(data, 0, data.length - 1, 0);
        assertThat(rc, is(true));

        byte[] recvd = pull.recv();
        assertThat(recvd, is("DEF".getBytes(ZMQ.CHARSET)));

        byte[] datb = new byte[2];
        int received = pull.recv(datb, 0, datb.length, 0);
        assertThat(received, is(2));
        assertThat(datb, is("AB".getBytes(ZMQ.CHARSET)));

        push.close();
        pull.close();
        context.term();
    }