Roxen.git / server / base_server / prototypes.pike

version» Context lines:

Roxen.git/server/base_server/prototypes.pike:4249:    mapping(string:mixed) make_collection(string path, RequestID id);    mapping(string:mixed) recurse_copy_files(string source, string destination,    PropertyBehavior behavior,    Overwrite overwrite, RequestID id,    int|void one_level);    mapping(string:mixed) recurse_move_files(string source, string destination,    PropertyBehavior behavior,    Overwrite overwrite, RequestID id);   }    + //! @appears WebSocketAPI + //! API used by websockets. + //! + //! An object implementing this class is passed to + //! @[Roxen.upgrade_to_websocket()]. + class WebSocketAPI + { +  //! @decl void websocket_ready(WebSocket ws) +  //! +  //! Callback called when the websocket connection has been setup and +  //! we are ready to send messages across the connection. +  //! +  //! @param ws +  //! @[WebSocket] for the new connection. +  void websocket_ready(Protocols.WebSocket.Connection ws); +  +  //! @decl void websocket_message(WebSocket ws, @ +  //! Protocols.WebSocket.Frame frame) +  //! +  //! Callback called when a webscoket message has arrived. +  //! +  //! @param ws +  //! @[WebSocket] on which the message arrived. +  //! +  //! @param frame +  //! Websocket message. +  void websocket_message(Protocols.WebSocket.Connection ws, +  Protocols.WebSocket.Frame frame); +  +  //! @decl void websocket_close(WebSocket ws, @ +  //! Protocols.WebSocket.CLOSE_STATUS reason) +  //! +  //! Called when a websocket connection is being closed. +  //! +  //! @param ws +  //! @[WebSocket] that is being closed. +  //! +  //! @param reason +  //! Reason code for what has triggered the close. +  //! +  //! @note +  //! Will be called even when this side has ended the connection +  //! by calling @[WebSocket()->websocket_close()] in @[ws]. +  void websocket_close(Protocols.WebSocket.Connection ws, +  Protocols.WebSocket.CLOSE_STATUS reason); + } +    class PatchPropertyCommand   {    constant command = "";    string property_name;    mapping(string:mixed) execute(PropertySet context);   }      class _roxen   {    mapping(string:object) variables;