zeromq / chumak

Pure Erlang implementation of ZeroMQ Message Transport Protocol.
Mozilla Public License 2.0
197 stars 47 forks source link

Multipart send/recv support for `REQ` #52

Closed siiky closed 1 year ago

siiky commented 1 year ago

Hello!

I'm working on a project in Erlang and Java where it would be very useful to have multipart message send/recv support for REQ sockets. I saw send_multipart/2 in the docs and was excited, but once I tried it I got the not_implemented_yet error. :'(

I checked the code out a bit, and apparently some other types of sockets already support it, and the code for the ROUTER and DEALER isn't even that different. So I'm wondering why it hasn't been implemented for all socket types: there was no time/interest/&c, or there were problems?

If the issue was time/interest, and the send_multipart code for REQ is basically the same for ROUTER/DEALER, I'd like to try my hand at it, so I can still use it for this project.

drozzy commented 1 year ago

You are right, it was primarily time/interest. Go ahead and do it - I'll merge it gladly.

siiky commented 1 year ago

Awesome, thanks for the very quick reply! Already started working on it and think I got send_multipart right, but recv_multipart is not there yet. I'm stopping here for today, it's already very late, but I'll open a WIP PR in case you can comment/guide me towards the right direction so I can continue tomorrow.