|
|
| WebSocketRule (std::string rule, App *app) |
| |
| void | validate () override |
| |
| void | handle (request &, response &res, const routing_params &) override |
| |
| void | handle_upgrade (const request &req, response &, SocketAdaptor &&adaptor) override |
| |
| void | handle_upgrade (const request &req, response &, UnixSocketAdaptor &&adaptor) override |
| |
| void | handle_upgrade (const request &req, response &, SSLAdaptor &&adaptor) override |
| |
|
self_t & | max_payload (uint64_t max_payload) |
| | Override the global payload limit for this single WebSocket rule.
|
| |
|
self_t & | subprotocols (const std::vector< std::string > &subprotocols) |
| |
|
template<typename Func > |
| self_t & | onopen (Func f) |
| |
|
template<typename Func > |
| self_t & | onmessage (Func f) |
| |
|
template<typename Func > |
| self_t & | onclose (Func f) |
| |
|
template<typename Func > |
| self_t & | onerror (Func f) |
| |
|
self_t & | onaccept (std::function< void(const crow::request &, std::optional< crow::response > &, void **)> &&callback) |
| |
|
self_t & | onaccept (std::function< bool(const crow::request &, void **)> &&callback) |
| |
|
self_t & | mirrorprotocols (bool mirror_protocols=true) |
| |
|
| BaseRule (std::string rule) |
| |
|
void | set_added () |
| |
|
bool | is_added () |
| |
|
std::unique_ptr< BaseRule > | upgrade () |
| |
|
uint32_t | get_methods () |
| |
|
template<typename F > |
| void | foreach_method (F f) |
| |
|
const std::string & | rule () |
| |
template<typename
App>
class crow::WebSocketRule< App >
A rule dealing with websockets.
Provides the interface for the user to put in the necessary handlers for a websocket to work.