pike.git / lib / modules / Protocols.pmod / EngineIO.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/EngineIO.pmod:705:    request = req;    _options = .EngineIO.options;    if (options && sizeof(options))    _options += options;    switch (curtransport = req.variables->transport) {    default:    req.response_and_finish((["data":"Unsupported transport",    "error":Protocols.HTTP.HTTP_UNSUPP_MEDIA]));    return;    case "websocket": -  conn = WebSocket(req, req.websocket_accept(0, _options)); +  conn = WebSocket(req, req.websocket_accept(0, UNDEFINED, _options));    break;    case "polling":    conn = req.variables.j ? JSONP(req) : XHR(req);    break;    }    conn.read_cb = recv;    ci->add(Crypto.Random.random_string(SIDBYTES-TIMEBYTES));    ci->add_hint(gethrtime(), TIMEBYTES);    sid = MIME.encode_base64(ci->read());    clients[sid] = this;