Fawkes API
Fawkes Development Version
|
Thread aspect for network communication. More...
#include <>>
Public Member Functions | |
virtual | ~NetworkAspect () |
Virtual empty Destructor. | |
void | init_NetworkAspect (NetworkNameResolver *resolver, ServicePublisher *service_publisher, ServiceBrowser *service_browser) |
Init network aspect. | |
Protected Attributes | |
NetworkNameResolver * | nnresolver |
Network name resolver to lookup IP addresses of hostnames and vice versa. | |
ServicePublisher * | service_publisher |
Service publisher to publish services on the network. | |
ServiceBrowser * | service_browser |
Service browser to browse services on the network. |
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 initNetworkAspect() is called before the thread is started.
fawkes::NetworkAspect::~NetworkAspect | ( | ) | [virtual] |
Virtual empty Destructor.
Definition at line 62 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 76 of file network.cpp.
References nnresolver, service_publisher, and service_browser.
Referenced by fawkes::AspectIniFin::init().
NetworkNameResolver fawkes::NetworkAspect::nnresolver [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 43 of file network.h.
Referenced by FountainThread::init(), init_NetworkAspect(), WorldModelNetworkThread::init(), WebviewThread::init(), and XmlRpcThread::init().
Service browser to browse services on the network.
The service_browser will remain valid for the whole lifetime of the thread.
Definition at line 45 of file network.h.
Referenced by init_NetworkAspect(), WebviewThread::init(), and WebviewThread::finalize().
Service publisher to publish services on the network.
The service_publisher will remain valid for the whole lifetime of the thread.
Definition at line 44 of file network.h.
Referenced by FountainThread::init(), FountainThread::finalize(), init_NetworkAspect(), WebviewThread::init(), WebviewThread::finalize(), XmlRpcThread::init(), and XmlRpcThread::finalize().