zmq_proxy and optional parameter
I'm not an expert both in Julia and zeromq and I was playing with this wrapper. My example uses the `zmq_proxy`, which is missing in the wrapper currently, and I managed to make it work.
I would have open a PR with a minimal proposal, but I faced an issue that I'd like to know from you Julia and ZMQ.jl experts about how to address it.
The wrapper function would be something similar to
```julia
function proxy(frontend::Socket, backend::Socket, context::Socket)
ccall((:zmq_proxy, libzmq),
Cint, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}),
frontend, backend, context)
end
```
I have a few concerns about this function per se, but the main problem keeping me away from opening a PR is the fact that `context` may be NULL or a Socket, and I was not able to figure out a way in the ZMQ.jl design to create a "null" Socket (e.g. I may evaluate to add an additional Socket constructor that sets `data = C_NULL`, but then the problem is the `Socket.pollfd`, which in turn I don't know anything about).
5 条评论