celluloid / celluloid-zmq

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid actors that talk over the 0MQ protocol
https://celluloid.io
MIT License
83 stars 25 forks source link

Allow setting and getting socket options #27

Closed jasonroelofs closed 10 years ago

jasonroelofs commented 10 years ago

With the release of ZeroMQ 4, there are ever more options that can be set on a socket. Specifically in my case, the security options. This PR adds #set and #get to sockets which just proxy the arguments directly down to the ffi-rzmq handler for the socket. Celluloid doesn't have to care about types, that's handled deeper down.

jasonroelofs commented 10 years ago

The build is failing because of changes made in Celluloid 0.16 (not out yet) and this project pulls in Celluloid from master via bundler. Tests pass fine on Celluloid 0.15.

tarcieri commented 10 years ago

Seems good. By "security options" do you mean CurveZMQ? That is definitely something I'm interested, and while I've been tracking the protocol changes vs CurveCP, I haven't done much digging into the actual implementation.

I would like to get the tests passing with Celluloid 0.16 first, then maybe we can rebase this and merge when the tests pass again?

jasonroelofs commented 10 years ago

Yep! Curve is delightfully easy to set up and use. I put together a quick example here: https://github.com/chuckremes/ffi-rzmq/blob/master/examples/repreq_over_curve.rb. And sure, I'll keep an eye on things and keep this branch up-to-date.

tarcieri commented 10 years ago

Wanted to give this more scrutiny because it's security-related, but this change looks rather trivial. Also the build failures seem to be unrelated.

tarcieri commented 10 years ago

Seems good, thanks!