Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
NetworkAspect () | |
Constructor. More... | |
virtual | ~NetworkAspect () |
Virtual empty Destructor. More... | |
void | init_NetworkAspect (NetworkNameResolver *resolver, ServicePublisher *service_publisher, ServiceBrowser *service_browser) |
Init network aspect. More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Protected Attributes | |
NetworkNameResolver * | nnresolver |
ServicePublisher * | service_publisher |
ServiceBrowser * | service_browser |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
Thread aspect for network communication. Give this aspect to your thread if you want to implement custom network communication. With this aspect you get access to the central network name resolver and you may publish service on the network and browse for existing services (for example using mDNS-SD via Avahi).
It is guaranteed that if used properly from within plugins that init_NetworkAspect() is called before the thread is started.
fawkes::NetworkAspect::NetworkAspect | ( | ) |
Constructor.
Definition at line 65 of file network.cpp.
|
virtual |
Virtual empty Destructor.
Definition at line 71 of file network.cpp.
void fawkes::NetworkAspect::init_NetworkAspect | ( | NetworkNameResolver * | resolver, |
ServicePublisher * | service_publisher, | ||
ServiceBrowser * | service_browser | ||
) |
Init network aspect.
It is guaranteed that this is called for a thread having the netwok aspect before Thread::start() is called (when running regularly inside Fawkes).
resolver | network name resolver |
service_publisher | service publisher |
service_browser | service browser |
Definition at line 84 of file network.cpp.
|
protected |
Network name resolver to lookup IP addresses of hostnames and vice versa. The nnresolver will remain valid for the whole lifetime of the thread.
Definition at line 54 of file network.h.
Referenced by FountainThread::init(), WebviewThread::init(), and XmlRpcThread::init().
|
protected |
Service browser to browse services on the network. The service_browser will remain valid for the whole lifetime of the thread.
Definition at line 56 of file network.h.
Referenced by WebviewThread::finalize(), and WebviewThread::init().
|
protected |
Service publisher to publish services on the network. The service_publisher will remain valid for the whole lifetime of the thread.
Definition at line 55 of file network.h.
Referenced by FountainThread::finalize(), WebviewThread::finalize(), XmlRpcThread::finalize(), FountainThread::init(), GossipThread::init(), WebviewThread::init(), and XmlRpcThread::init().