protocol factory for TCP over IPv4 and IPv6
More...
#include <tcp-factory.hpp>
|
template<typename ChannelMap > |
static std::vector< shared_ptr< const Channel > > | getChannelsFromMap (const ChannelMap &channelMap) |
|
protocol factory for TCP over IPv4 and IPv6
Definition at line 37 of file tcp-factory.hpp.
unique_ptr< ProtocolFactory > nfd::face::ProtocolFactory::create |
( |
const std::string & |
id | ) |
|
|
staticinherited |
- Returns
- a protocol factory instance
- Return values
-
nullptr | if factory with id is not registered |
Definition at line 41 of file protocol-factory.cpp.
shared_ptr< TcpChannel > nfd::face::TcpFactory::createChannel |
( |
const std::string & |
localIp, |
|
|
const std::string & |
localPort |
|
) |
| |
Create TCP-based channel using specified IP address and port number.
This method is just a helper that converts a string representation of localIp and port to tcp::Endpoint and calls the other createChannel overload.
- Exceptions
-
Definition at line 231 of file tcp-factory.cpp.
Try to create Face using the supplied FaceUri.
This method should automatically choose channel, based on supplied FaceUri and create face.
- Parameters
-
uri | remote URI of the new face |
persistency | persistency of the new face |
wantLocalFieldsEnabled | whether local fields should be enabled on the face |
onCreated | callback if face creation succeeds If a face with the same remote URI already exists, its persistency and LocalFieldsEnabled setting will not be modified. |
onFailure | callback if face creation fails |
Implements nfd::face::ProtocolFactory.
Definition at line 124 of file tcp-factory.cpp.
std::vector< shared_ptr< const Channel > > nfd::face::TcpFactory::getChannels |
( |
| ) |
const |
|
overridevirtual |
template<typename ChannelMap >
static std::vector<shared_ptr<const Channel> > nfd::face::ProtocolFactory::getChannelsFromMap |
( |
const ChannelMap & |
channelMap | ) |
|
|
inlinestaticprotectedinherited |
const std::string & nfd::face::TcpFactory::getId |
( |
| ) |
|
|
static |
const std::set<std::string>& nfd::face::ProtocolFactory::getProvidedSchemes |
( |
| ) |
|
|
inlineinherited |
std::set< std::string > nfd::face::ProtocolFactory::listRegistered |
( |
| ) |
|
|
staticinherited |
template<typename PF >
static void nfd::face::ProtocolFactory::registerType |
( |
const std::string & |
id = PF::getId() | ) |
|
|
inlinestaticinherited |
register a protocol factory type
- Template Parameters
-
- Parameters
-
Definition at line 54 of file protocol-factory.hpp.
std::set<std::string> nfd::face::ProtocolFactory::providedSchemes |
|
protectedinherited |