zeromq / zeromq4-x

ØMQ 4.x stable release branch - bug fixes only
GNU General Public License v3.0
458 stars 196 forks source link

zmq_msg_recv return int while the type of 'size' parameter of zmq_msg_init_size is 'size_t' #168

Closed hnwyllmm closed 5 years ago

hnwyllmm commented 5 years ago

in 64bit system, size_t is uint64_t, int is int32_t. If I send a message with size large than 4G, then I cannot receive it with zmq_msg_recv

hnwyllmm commented 5 years ago

Can I use the zmq_msg_size(msg) routine to get the size? The huge message will transfer through TCP.

bluca commented 5 years ago

Yes, it's just the return code that gets truncated, the message will be fine