Class implementing WebSocket-based channel to create faces. More...
#include <daemon/face/websocket-channel.hpp>
Public Member Functions | |
WebSocketChannel (const websocket::Endpoint &localEndpoint) | |
Create WebSocket channel for the local endpoint. More... | |
const FaceUri & | getUri () const |
bool | isListening () const override |
Returns whether the channel is listening. More... | |
void | listen (const FaceCreatedCallback &onFaceCreated) |
Enable listening on the local endpoint, accept connections, and create faces when remote host makes a connection. More... | |
size_t | size () const override |
Returns the number of faces in the channel. More... | |
Protected Member Functions | |
void | setUri (const FaceUri &uri) |
Class implementing WebSocket-based channel to create faces.
Definition at line 43 of file websocket-channel.hpp.
|
explicit |
Create WebSocket channel for the local endpoint.
To enable creation of faces upon incoming connections, one needs to explicitly call WebSocketChannel::listen method. The created channel is bound to the localEndpoint.
Definition at line 36 of file websocket-channel.cpp.
|
inlineinherited |
Definition at line 59 of file channel.hpp.
|
inlineoverridevirtual |
Returns whether the channel is listening.
Implements nfd::face::Channel.
Definition at line 57 of file websocket-channel.hpp.
void nfd::face::WebSocketChannel::listen | ( | const FaceCreatedCallback & | onFaceCreated | ) |
Enable listening on the local endpoint, accept connections, and create faces when remote host makes a connection.
onFaceCreated | Callback to notify successful creation of a face |
Definition at line 143 of file websocket-channel.cpp.
|
protectedinherited |
Definition at line 34 of file channel.cpp.
|
inlineoverridevirtual |
Returns the number of faces in the channel.
Implements nfd::face::Channel.
Definition at line 63 of file websocket-channel.hpp.