Change the socket interface to be more Julian.

Also, add a ZMQ interface in case it is useful at some point.