Roxen.git / server / modules / examples / websocket_example.pike

version» Context lines:

Roxen.git/server/modules/examples/websocket_example.pike:36:      string query_name()   {    return sprintf("Example module mounted on %s",    query_location());   }      mapping(string:mixed)|int(0..0) find_file(string path, RequestID id)   {    WS_WERR("find_file(%O, %O) called. Method: %O\n", path, id, id->method); -  if (id->method != "WebSocketOpen") return 0; +  if (id->method != Roxen.WEBSOCKET_OPEN_METHOD) return 0;    if (path != "") return 0;    return Roxen.upgrade_to_websocket(this, 0);   }      inherit WebSocketAPI;      void websocket_ready(WebSocket ws)   {    WS_WERR("%O ready. Pending: %d\n", ws->id, ws->id->ws_msg_pending);   }