I am not a huge fan of "x2y" naming (personal preference). If you can rename this to:

     ZMQSocket::identityToFD

Otherwise the patch looks very good!