function client(req, res) {
    if (req.uri.pathname !== primusjs) return;

    //
    // Lazy include and compile the library so we give our server some time to
    // add plugins or we will compile the client library without plugins, which
    // is sad :(
    //
    library = library || Buffer.from(primus.library());
    length = length || library.length;

    res.statusCode = 200;
    res.setHeader('Content-Type', 'text/javascript; charset=utf-8');
    res.setHeader('Content-Length', length);
    res.end(library);

    return true;
  }
The actual HTTP middleware.

@param {Request} req HTTP request.
@param {Response} res HTTP response.
@api private