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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/EngineIO.pmod:550:    private void flush() {    if(catch(conn.flush())) {    catch(conn.close());    if (upgtransport)    catch(upgtransport.close());    }    }       private void flushrecvq() {    while (read_cb && !recvq.is_empty()) -  read_cb(query_id(), recvq.read()); +  read_cb(query_id(), recvq.get());    }       //! Close the socket signalling the other side.    final void close() {    if (state < SCLOSING) {    if (close_cb)    close_cb(query_id());    PT("Send close, state %O\n", state);    state = SCLOSING;    catch(send(CLOSE));
pike.git/lib/modules/Protocols.pmod/EngineIO.pmod:606:    rclose();    clearcallback();    break;    case PING:    send(PONG, msg);    break;    case MESSAGE:    if (read_cb && recvq.is_empty())    read_cb(query_id(), msg);    else { -  recvq.write(msg); +  recvq.put(msg);    flushrecvq();    }    break;    }    }       private void upgrecv(int type, string|Stdio.Buffer msg) {    switch (type) {    default: // Protocol error or CLOSE    upgtransport = 0;