#include <websocket-factory.hpp>
Classes | |
class | Error |
Exception of WebSocketFactory. More... | |
Public Member Functions | |
shared_ptr< WebSocketChannel > | createChannel (const websocket::Endpoint &localEndpoint) |
Create WebSocket-based channel using websocket::Endpoint. More... | |
shared_ptr< WebSocketChannel > | createChannel (const std::string &localIp, const std::string &localPort) |
Create WebSocket-based channel using specified IP address and port number. More... | |
virtual void | createFace (const FaceUri &uri, ndn::nfd::FacePersistency persistency, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onConnectFailed) 1 |
Try to create Face using the supplied FaceUri. More... | |
virtual std::vector< shared_ptr< const Channel > > | getChannels () const 1 |
Definition at line 34 of file websocket-factory.hpp.
shared_ptr< WebSocketChannel > nfd::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.
WebSocketFactory::Error |
Definition at line 33 of file websocket-factory.cpp.
Referenced by createChannel(), and nfd::WebSocketFactory::Error::Error().
shared_ptr< WebSocketChannel > nfd::WebSocketFactory::createChannel | ( | const std::string & | localIp, |
const std::string & | localPort | ||
) |
Create WebSocket-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 websocket::Endpoint and calls the other createChannel overload.
WebSocketFactory::Error |
Definition at line 46 of file websocket-factory.cpp.
References createChannel().
|
virtual |
Try to create Face using the supplied FaceUri.
This method should automatically choose channel, based on supplied FaceUri and create face.
Error | Factory does not support connect operation |
Error | specified persistency is not supported |
Implements nfd::ProtocolFactory.
Definition at line 54 of file websocket-factory.cpp.
Referenced by nfd::WebSocketFactory::Error::Error().
|
virtual |
Implements nfd::ProtocolFactory.
Definition at line 63 of file websocket-factory.cpp.
Referenced by nfd::WebSocketFactory::Error::Error().