26 #ifndef NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP
27 #define NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP
35 typedef boost::asio::ip::tcp::endpoint
Endpoint;
76 setPingInterval(time::milliseconds interval);
81 setPongTimeout(time::milliseconds timeout);
84 handlePong(websocketpp::connection_hdl hdl);
87 handlePongTimeout(websocketpp::connection_hdl hdl);
91 handleMessage(websocketpp::connection_hdl hdl,
92 websocket::Server::message_ptr msg);
95 handleOpen(websocketpp::connection_hdl hdl);
98 handleClose(websocketpp::connection_hdl hdl);
104 std::map<websocketpp::connection_hdl, shared_ptr<Face>,
105 std::owner_less<websocketpp::connection_hdl>> m_channelFaces;
108 time::milliseconds m_pingInterval;
114 return m_server.is_listening();
119 #endif // NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP
WebSocketChannel(const websocket::Endpoint &localEndpoint)
Create WebSocket channel for the local endpoint.
websocketpp::server< websocketpp::config::asio > Server
size_t size() const
Get number of faces in the channel.
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Class implementing WebSocket-based channel to create faces.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when the face is created (as a response to incoming connec...
boost::asio::ip::tcp::endpoint Endpoint
void listen(const FaceCreatedCallback &onFaceCreated)
Enable listening on the local endpoint, accept connections, and create faces when remote host makes a...