mount static method

void mount(
  1. String prefix,
  2. RawRequestHandler handler
)

send every request whose path starts with prefix straight to handler, before routing, middleware and body reading. the handler writes and closes the response itself. Socket.IO uses this for /socket.io/.

Route.mount('/socket.io/', io.handle);

Implementation

static void mount(String prefix, RawRequestHandler handler) {
  _mounts[prefix] = handler;
}