NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::face::WebSocketChannel Class Reference

Class implementing WebSocket-based channel to create faces. More...

#include <websocket-channel.hpp>

Inheritance diagram for nfd::face::WebSocketChannel:
Collaboration diagram for nfd::face::WebSocketChannel:

Public Member Functions

 WebSocketChannel (const websocket::Endpoint &localEndpoint)
 Create WebSocket channel for the local endpoint. More...
 
bool isListening () const override
 Returns whether the channel is listening. More...
 
size_t size () const override
 Returns the number of faces in the channel. More...
 
void listen (const FaceCreatedCallback &onFaceCreated)
 Enable listening on the local endpoint, accept connections, and create faces when remote host makes a connection. More...
 
- Public Member Functions inherited from nfd::face::Channel
virtual ~Channel ()
 
const FaceUrigetUri () const
 

Additional Inherited Members

- Protected Member Functions inherited from nfd::face::Channel
void setUri (const FaceUri &uri)
 

Detailed Description

Class implementing WebSocket-based channel to create faces.

Definition at line 43 of file websocket-channel.hpp.

Constructor & Destructor Documentation

Member Function Documentation

bool nfd::face::WebSocketChannel::isListening ( ) const
inlineoverridevirtual

Returns whether the channel is listening.

Implements nfd::face::Channel.

Definition at line 57 of file websocket-channel.hpp.

Referenced by listen().

size_t nfd::face::WebSocketChannel::size ( ) const
inlineoverridevirtual

Returns the number of faces in the channel.

Implements nfd::face::Channel.

Definition at line 63 of file websocket-channel.hpp.

References websocketpp::lib::asio::milliseconds(), PUBLIC_WITH_TESTS_ELSE_PRIVATE, and websocketpp::transport::error::timeout.

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.

Parameters
onFaceCreatedCallback to notify successful creation of a face

Definition at line 143 of file websocket-channel.cpp.

References isListening(), websocketpp::transport::asio::endpoint< config >::listen(), NFD_LOG_CHAN_DEBUG, NFD_LOG_CHAN_WARN, and websocketpp::server< config >::start_accept().


The documentation for this class was generated from the following files: