zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.48k stars 212 forks source link

Get connection metadata via zmq_msg_gets #327

Open seasick opened 5 years ago

seasick commented 5 years ago

I'm working on a project where I'm using CURVE and ZMQ with zeromq.js - thanks for all your work creating this library!

Now I'd like to use the metadata provided with the connection for authentication/authorization, but I've found no way yet to do this with this library. As workaround I am currently adding this information to every message I'm sending.

I don't think this has been implemented yet, but maybe I'm wrong :smile: Are there any plans to add this feature to this library?

I think I could manage to add this feature myself, but I definitely would need some guidance on how to add it to this library without breaking any existing workflow/patterns/whatnot. From what I've gathered zmq-msg-gets is the function that would get me the desired meta data I'm looking for.

rolftimmermans commented 5 years ago

Seems like an excellent question but I don't have a clear idea what would make for a good, unintrusive API to support this. Suggestions are welcome!