roar
Loading...
Searching...
No Matches
examples
websocket
request_listener.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
roar/routing/request_listener.hpp
>
4
#include <
roar/websocket/websocket_session.hpp
>
5
6
#include <memory>
7
8
class
RequestListener
:
public
std::enable_shared_from_this<RequestListener>
9
{
10
private
:
11
ROAR_MAKE_LISTENER
(
RequestListener
);
12
13
ROAR_GET
(ws)
14
({
15
.path =
"/api/ws"
,
16
.routeOptions =
17
{
18
.expectUpgrade =
true
,
19
},
20
});
21
22
private
:
23
std::shared_ptr<Roar::WebsocketSession>
ws_
;
24
25
private
:
26
BOOST_DESCRIBE_CLASS(
RequestListener
, (), (), (), (roar_ws))
27
};
RequestListener
Definition
request_listener.hpp:8
RequestListener::ws_
std::shared_ptr< Roar::WebsocketSession > ws_
Definition
request_listener.hpp:23
RequestListener::ROAR_MAKE_LISTENER
ROAR_MAKE_LISTENER(RequestListener)
request_listener.hpp
ROAR_GET
#define ROAR_GET(HandlerName)
Define route for GET, others can be accessed via ROAR_ROUTE({.verb = ..., .path = ""})
Definition
request_listener.hpp:264
websocket_session.hpp
Generated by
1.9.7