fawkes::NetworkAspect Class Reference
[Fawkes Thread Aspects]
Thread aspect for network communication.
More...
#include <aspect/network.h>

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. | |
Detailed Description
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.
Definition at line 33 of file network.h.
Constructor & Destructor Documentation
| fawkes::NetworkAspect::~NetworkAspect | ( | ) | [virtual] |
Member Function Documentation
| 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).
- Parameters:
-
resolver network name resolver service_publisher service publisher service_browser service browser
Definition at line 76 of file network.cpp.
References nnresolver.
Referenced by fawkes::AspectIniFin::init().
Member Data Documentation
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 WebviewThread::init(), WorldModelNetworkThread::init(), FountainThread::init(), and init_NetworkAspect().
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 WebviewThread::finalize(), and WebviewThread::init().
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 WebviewThread::finalize(), FountainThread::finalize(), WebviewThread::init(), and FountainThread::init().
The documentation for this class was generated from the following files:
- src/libs/aspect/network.h
- src/libs/aspect/network.cpp

