I’ve been dabbling with JNI for a while, trying to get Curve Encryption working inside the java binding for 0mq.
Everything looks like it’s working nicely, until I try to actually set the server’s private key (which, honestly, is step 2…but I’m pretty thrilled that I finally got the monster to build at all).
Setting that socket option fails: “Invalid argument(0x16)”. I spent some time digging through my code trying to figure out how and when I might be supplying that. Then I verified that the same call basically works fine with the python bindings (though I didn’t dig in to look at details). And *then* I resorted to google.
Where all the results were about Storm, and rolling back to some really ancient version they forked back before jzmq had released any code. The general consensus seems that the fix is to roll your 0mq version back to something really obsolete, like 2.1.7.
All this was barking up the wrong tree. 0x16 is the hex code for EINVALID. I should have paid more attention to the actual error message.
I haven’t tracked down the actual problem yet, but the point is that this is an *extremely* generic error message/code.