def client(addr, id, pubkey=nil, linger=1000)
      fail IOError unless addr && id

      socket = Celluloid::ZMQ::DealerSocket.new
      fail IOError unless socket
      begin
        set_client_key socket, pubkey
        socket.identity = id
        socket.connect addr
        socket.linger = linger
      rescue IOError
        socket.close
        raise
      end
      socket
    end
def client(addr, id, pubkey=nil, linger=1000)
      fail IOError unless addr && id

      socket = Celluloid::ZMQ::DealerSocket.new
      fail IOError unless socket
      begin
        set_client_key socket, pubkey
        socket.identity = id
        socket.connect addr
        socket.linger = linger
      rescue IOError
        socket.close
        raise
      end
      socket
    end
Connect to the given 0MQ address (in URL form ala tcp://host:port)