Class implementing a WebSocket-based channel to create faces. More...
#include <daemon/face/websocket-channel.hpp>
Inheritance diagram for nfd::face::WebSocketChannel:
Collaboration diagram for nfd::face::WebSocketChannel:Public Member Functions | |
| WebSocketChannel (const websocket::Endpoint &localEndpoint) | |
Create a WebSocket channel for the given localEndpoint. More... | |
| size_t | getDefaultMtu () const noexcept |
| Returns the default MTU for all faces created by this channel. More... | |
| const FaceUri & | getUri () const noexcept |
| bool | isListening () const final |
| 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 final |
| Returns the number of faces in the channel. More... | |
Protected Member Functions | |
| void | setDefaultMtu (size_t mtu) noexcept |
| void | setUri (const FaceUri &uri) noexcept |
Class implementing a WebSocket-based channel to create faces.
Definition at line 43 of file websocket-channel.hpp.
|
explicit |
Create a WebSocket channel for the given localEndpoint.
To enable the creation of faces upon incoming connections, one needs to explicitly call listen(). The created channel is bound to localEndpoint.
Definition at line 36 of file websocket-channel.cpp.
|
inlinenoexceptinherited |
Returns the default MTU for all faces created by this channel.
Definition at line 58 of file channel.hpp.
|
inlinenoexceptinherited |
Definition at line 49 of file channel.hpp.
|
inlinefinalvirtual |
Returns whether the channel is listening.
Implements nfd::face::Channel.
Definition at line 56 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 150 of file websocket-channel.cpp.
|
protectednoexceptinherited |
Definition at line 40 of file channel.cpp.
|
protectednoexceptinherited |
Definition at line 34 of file channel.cpp.
|
inlinefinalvirtual |
Returns the number of faces in the channel.
Implements nfd::face::Channel.
Definition at line 62 of file websocket-channel.hpp.