code: void register(String type, BiConsumer<ProtocolRequest, ServerConnection> handler) {
      handlers.put(type, handler);
    }
docs: Registers a message type handler.
  
  @param type    the message type
  @param handler the message handler