26 #ifndef NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP 27 #define NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP 35 typedef boost::asio::ip::tcp::endpoint
Endpoint;
59 return m_server.is_listening();
65 return m_channelFaces.size();
81 setPingInterval(time::milliseconds interval);
86 setPongTimeout(time::milliseconds timeout);
89 handlePong(websocketpp::connection_hdl hdl);
92 handlePongTimeout(websocketpp::connection_hdl hdl);
96 handleMessage(websocketpp::connection_hdl hdl,
97 websocket::Server::message_ptr msg);
100 handleOpen(websocketpp::connection_hdl hdl);
103 handleClose(websocketpp::connection_hdl hdl);
108 std::map<websocketpp::connection_hdl, shared_ptr<Face>,
109 std::owner_less<websocketpp::connection_hdl>> m_channelFaces;
111 time::milliseconds m_pingInterval;
117 #endif // NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
void listen(const FaceCreatedCallback &onFaceCreated)
Enable listening on the local endpoint, accept connections, and create faces when remote host makes a...
represent a channel that communicates on a local endpoint
Class implementing WebSocket-based channel to create faces.
websocketpp::server< websocketpp::config::asio > Server
std::function< void(const shared_ptr< Face > &face)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
WebSocketChannel(const websocket::Endpoint &localEndpoint)
Create WebSocket channel for the local endpoint.
Copyright (c) 2011-2015 Regents of the University of California.
bool isListening() const override
Returns whether the channel is listening.
boost::asio::ip::tcp::endpoint Endpoint
size_t size() const override
Returns the number of faces in the channel.