almost finishet migration from zeromq to sockets