def server(addr, id, privkey=nil, linger=1000)
      fail IOError unless addr && id

      socket = Celluloid::ZMQ::RouterSocket.new
      fail IOError unless socket
      begin
        set_server_key socket, privkey
        socket.identity = id
        socket.bind(addr)
        socket.linger = linger
      rescue IOError
        socket.close
        raise
      end
      addr = socket.get(::ZMQ::LAST_ENDPOINT).strip
      [socket, addr]
    end
def server(addr, id, privkey=nil, linger=1000)
      fail IOError unless addr && id

      socket = Celluloid::ZMQ::RouterSocket.new
      fail IOError unless socket
      begin
        set_server_key socket, privkey
        socket.identity = id
        socket.bind(addr)
        socket.linger = linger
      rescue IOError
        socket.close
        raise
      end
      addr = socket.get(::ZMQ::LAST_ENDPOINT).strip
      [socket, addr]
    end
Bind to the given 0MQ address (in URL form ala tcp://host:port)