ZMQ (Jeromq) - 套接字发送文档中缺少参数
ZMQ (Jeromq) - Missing parameter in socket send documentation
我目前正在尝试修改简单的 hwclient/hwserver 示例,以将具有预定义大小的字节数组发送到服务器。我已经看到基本上功能以下列形式给出:
public boolean send(byte[] data, int off, int length, int flags)
但是好像没有关于参数int off
的文档。谁能告诉我,这个参数是做什么的?
提前致谢
如果你想要完全消耗它总是0 byte[]
如果你想要部分消耗提及该数组索引的偏移量。
/**
* Queues a message created from data, so it can be sent.
*
* @param data the data to send.
* @param off the index of the first byte to be sent.
* @param length the number of bytes to be sent.
* @param flags a combination (with + or |) of the flags defined below:
* </ul>
* @return true when it has been queued on the socket and ØMQ has assumed responsibility for the message.
* This does not indicate that the message has been transmitted to the network.
*/
public boolean send(byte[] data, int off, int length, int flags)
我目前正在尝试修改简单的 hwclient/hwserver 示例,以将具有预定义大小的字节数组发送到服务器。我已经看到基本上功能以下列形式给出:
public boolean send(byte[] data, int off, int length, int flags)
但是好像没有关于参数int off
的文档。谁能告诉我,这个参数是做什么的?
提前致谢
如果你想要完全消耗它总是0 byte[]
如果你想要部分消耗提及该数组索引的偏移量。
/**
* Queues a message created from data, so it can be sent.
*
* @param data the data to send.
* @param off the index of the first byte to be sent.
* @param length the number of bytes to be sent.
* @param flags a combination (with + or |) of the flags defined below:
* </ul>
* @return true when it has been queued on the socket and ØMQ has assumed responsibility for the message.
* This does not indicate that the message has been transmitted to the network.
*/
public boolean send(byte[] data, int off, int length, int flags)