Public Member Functions | Protected Member Functions

zeus::TPeerFinder Class Reference

#include <PeerFinder.h>

Inheritance diagram for zeus::TPeerFinder:
zeus::TThread zeus::ISubject zeus::TZObject zeus::IThread zeus::IZUnknown zeus::IZUnknown zeus::IZUnknown

List of all members.

Public Member Functions

 TPeerFinder (Uint uiListeningPort, Uint uiProviderPort)
 TPeerFinder (const TString &rListeningAddress, Uint uiListeningPort, Uint uiProviderPort)
void setContinueSearching (bool bMode)
void startSearch ()
void stopSearch ()
void setProviderAddress (const TString &rProviderAddress)
void setQueryTimeout (const Float &rfTimeout)
void setReceivingTimeout (const Float &rfTimeout)
virtual bool signalizeStop (Float64 dTimeOut=5.0)
virtual Retval MQUALIFIER attach (IObserver &rObserver)
virtual Retval MQUALIFIER detach (IObserver &rObserver)
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const

Protected Member Functions

virtual ~TPeerFinder ()
virtual void execute ()
void notifyPeerFound (TDatagramPacket &rPacket)

Detailed Description

the peer finder broadcasts a message over the local network. The message is replayed by all peers


Constructor & Destructor Documentation

TPeerFinder::TPeerFinder ( Uint  uiListeningPort,
Uint  uiProviderPort 
)

creates a peer finder

Parameters:
uiListeningPort: Port of the listening socket
uiProviderPort: Port of the providers
TPeerFinder::TPeerFinder ( const TString rListeningAddress,
Uint  uiListeningPort,
Uint  uiProviderPort 
)

creates a peer finder

Parameters:
rListeningAddress: address of the listening socket
uiListeningPort: Port of the listening socket
uiProviderPort: Port of the providers
TPeerFinder::~TPeerFinder (  ) [protected, virtual]

destroys the peer finder


Member Function Documentation

virtual void MQUALIFIER zeus::TPeerFinder::addRef (  ) const [virtual]
See also:
IZUnknown::addRef

Reimplemented from zeus::TThread.

virtual Retval MQUALIFIER zeus::TPeerFinder::askForInterface ( const InterfaceID rInterfaceID,
IZUnknown *&  rpIface 
) [virtual]
See also:
IZUnknown::askForInterface

Reimplemented from zeus::TThread.

Retval MQUALIFIER TPeerFinder::attach ( IObserver rObserver ) [virtual]
See also:
ISubject::attach

Implements zeus::ISubject.

Retval MQUALIFIER TPeerFinder::detach ( IObserver rObserver ) [virtual]
See also:
ISubject::detach

Implements zeus::ISubject.

void TPeerFinder::execute (  ) [protected, virtual]
See also:
TThread::execute

Reimplemented from zeus::TThread.

void TPeerFinder::notifyPeerFound ( TDatagramPacket rPacket ) [protected]

Notification if a peer has been found

virtual void MQUALIFIER zeus::TPeerFinder::release (  ) const [virtual]
See also:
IZUnknown::release

Reimplemented from zeus::TThread.

void zeus::TPeerFinder::setContinueSearching ( bool  bMode ) [inline]

sets the continue searching mode

void TPeerFinder::setProviderAddress ( const TString rProviderAddress )

sets the provider address. Default is a broadcast address 255.255.255.255.

void zeus::TPeerFinder::setQueryTimeout ( const Float &  rfTimeout ) [inline]

sets the timeout

void zeus::TPeerFinder::setReceivingTimeout ( const Float &  rfTimeout ) [inline]

sets the timeout

bool TPeerFinder::signalizeStop ( Float64  dTimeOut = 5.0 ) [virtual]
See also:
TThread::execute

Reimplemented from zeus::TThread.

void zeus::TPeerFinder::startSearch (  ) [inline]

start the searching

void zeus::TPeerFinder::stopSearch (  ) [inline]

start the searching


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:28