protocol factory for WebSocket More...
#include <daemon/face/websocket-factory.hpp>
Inheritance diagram for nfd::face::WebSocketFactory:
Collaboration diagram for nfd::face::WebSocketFactory:Public Types | |
| using | CtorParams = ProtocolFactoryCtorParams |
Public Member Functions | |
| WebSocketFactory (const CtorParams ¶ms) | |
| shared_ptr< WebSocketChannel > | createChannel (const websocket::Endpoint &localEndpoint) |
| Create WebSocket-based channel using websocket::Endpoint. More... | |
| void | createFace (const CreateFaceRequest &req, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override |
| unicast face creation is not supported and will always fail More... | |
| std::vector< shared_ptr< const Channel > > | getChannels () const override |
| const std::set< std::string > & | getProvidedSchemes () |
| Get FaceUri schemes accepted by this ProtocolFactory. More... | |
| void | processConfig (OptionalConfigSection configSection, FaceSystem::ConfigContext &context) override |
| process face_system.websocket config section More... | |
Static Public Member Functions | |
| static unique_ptr< ProtocolFactory > | create (const std::string &id, const CtorParams ¶ms) |
| Create a protocol factory instance. More... | |
| static const std::string & | getId () |
| static std::set< std::string > | listRegistered () |
| Get registered protocol factory ids. More... | |
| template<typename PF > | |
| static void | registerType (const std::string &id=PF::getId()) |
| Register a protocol factory type. More... | |
Static Protected Member Functions | |
| template<typename ChannelMap > | |
| static std::vector< shared_ptr< const Channel > > | getChannelsFromMap (const ChannelMap &channelMap) |
Protected Attributes | |
| FaceCreatedCallback | addFace |
| callback when a new face is created More... | |
| shared_ptr< ndn::net::NetworkMonitor > | netmon |
| NetworkMonitor for listing available network interfaces and monitoring their changes. More... | |
| std::set< std::string > | providedSchemes |
| FaceUri schemes provided by this ProtocolFactory. More... | |
protocol factory for WebSocket
Definition at line 37 of file websocket-factory.hpp.
|
inherited |
Definition at line 62 of file protocol-factory.hpp.
|
explicit |
Definition at line 43 of file websocket-factory.cpp.
|
staticinherited |
Create a protocol factory instance.
| nullptr | if factory with id is not registered |
Definition at line 41 of file protocol-factory.cpp.
| shared_ptr< WebSocketChannel > nfd::face::WebSocketFactory::createChannel | ( | const websocket::Endpoint & | localEndpoint | ) |
Create WebSocket-based channel using websocket::Endpoint.
websocket::Endpoint is really an alias for boost::asio::ip::tcp::endpoint.
If this method called twice with the same endpoint, only one channel will be created. The second call will just retrieve the existing channel.
Definition at line 129 of file websocket-factory.cpp.
|
overridevirtual |
unicast face creation is not supported and will always fail
Implements nfd::face::ProtocolFactory.
Definition at line 121 of file websocket-factory.cpp.
|
overridevirtual |
Implements nfd::face::ProtocolFactory.
Definition at line 142 of file websocket-factory.cpp.
|
inlinestaticprotectedinherited |
Definition at line 165 of file protocol-factory.hpp.
|
static |
Definition at line 37 of file websocket-factory.cpp.
|
inlineinherited |
Get FaceUri schemes accepted by this ProtocolFactory.
Definition at line 127 of file protocol-factory.hpp.
|
staticinherited |
Get registered protocol factory ids.
Definition at line 53 of file protocol-factory.cpp.
|
overridevirtual |
process face_system.websocket config section
Implements nfd::face::ProtocolFactory.
Definition at line 49 of file websocket-factory.cpp.
|
inlinestaticinherited |
Register a protocol factory type.
| S | subclass of ProtocolFactory |
| id | factory identifier |
Definition at line 70 of file protocol-factory.hpp.
|
protectedinherited |
callback when a new face is created
Definition at line 181 of file protocol-factory.hpp.
|
protectedinherited |
NetworkMonitor for listing available network interfaces and monitoring their changes.
ProtocolFactory subclass should check the NetworkMonitor has sufficient capabilities prior to usage.
Definition at line 188 of file protocol-factory.hpp.
|
protectedinherited |
FaceUri schemes provided by this ProtocolFactory.
Definition at line 180 of file protocol-factory.hpp.