Fawkes API  Fawkes Development Version
fawkes::NetworkAspect Class Reference

Thread aspect for network communication. More...

#include <>>

Inheritance diagram for fawkes::NetworkAspect:

List of all members.

Public Member Functions

 NetworkAspect ()
 Constructor.
virtual ~NetworkAspect ()
 Virtual empty Destructor.
void init_NetworkAspect (NetworkNameResolver *resolver, ServicePublisher *service_publisher, ServiceBrowser *service_browser)
 Init network aspect.

Protected Attributes

NetworkNameResolvernnresolver
 Network name resolver to lookup IP addresses of hostnames and vice versa.
ServicePublisherservice_publisher
 Service publisher to publish services on the network.
ServiceBrowserservice_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 init_NetworkAspect() is called before the thread is started.

Author:
Tim Niemueller

Constructor & Destructor Documentation

fawkes::NetworkAspect::NetworkAspect ( )

Constructor.

Definition at line 65 of file network.cpp.

fawkes::NetworkAspect::~NetworkAspect ( ) [virtual]

Virtual empty Destructor.

Definition at line 71 of file network.cpp.


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:
resolvernetwork name resolver
service_publisherservice publisher
service_browserservice browser

Definition at line 85 of file network.cpp.

Referenced by fawkes::NetworkAspectIniFin::init().


Member Data Documentation

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 48 of file network.h.

Referenced by WorldModelNetworkThread::init(), FountainThread::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 50 of file network.h.

Referenced by 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 49 of file network.h.

Referenced by FountainThread::init(), FountainThread::finalize(), WebviewThread::init(), WebviewThread::finalize(), XmlRpcThread::init(), and XmlRpcThread::finalize().


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