Beamlib 3.3.2
This is the Beam C++ class library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
BoapServer Class Reference

Boap server. More...

#include <Boap.h>

Inheritance diagram for BoapServer:
BThread

Public Types

enum  { NOTHREADS =0 , THREADED =1 }
 

Public Member Functions

 BoapServer ()
 
virtual ~BoapServer ()
 
virtual BError init (BString boapNsHost="", int port=0, int threaded=0, int isBoapns=0)
 
virtual BError run (int inThread=0)
 
virtual BError process (BoapServerConnection *conn, BoapPacket &rx, BoapPacket &tx)
 
virtual BError processEvent (BoapPacket &rx)
 
virtual BError addObject (BoapServiceObject *object)
 
virtual BError sendEvent (BoapPacket &tx)
 
virtual BError processEvent (int fd)
 
virtual void clientGone (BoapServerConnection *client)
 
BSocketgetSocket ()
 
BSocketgetEventSocket ()
 
BString getHostName ()
 
int getConnectionsNumber ()
 
void closeConnections ()
 
virtual BoapServerConnectionnewConnection (int fd, BSocketAddressINET address)
 
 BoapServer ()
 
BError init (int boapNs=0)
 
BError run ()
 
BError processEvent (BoapPacket &rx)
 
BError addObject (BoapServiceObject *object)
 
BError process (int fd)
 
BError sendEvent (BoapPacket &tx)
 
BSocketgetSocket ()
 
BSocketgetEventSocket ()
 
BError processEvent (int fd)
 
BString getHostName ()
 
- Public Member Functions inherited from BThread
 BThread ()
 
virtual ~BThread ()
 
int setInitPriority (int policy, int priority)
 
int setInitStackSize (size_t stackSize)
 
int start ()
 
void * result ()
 
int running ()
 
int setPriority (int policy, int priority)
 
int cancel ()
 
void * waitForCompletion ()
 
pthread_t getThread ()
 
virtual void * function ()
 

Public Attributes

BUInt64 onumOperations
 

Protected Member Functions

void * function ()
 

Protected Attributes

BMutex olock
 
int othreaded
 
int oisBoapns
 
Boapns::Boapnsoboapns
 
BList< BoapServerConnection * > oclients
 
BEvent1Int oclientGoneEvent
 
BList< BoapServiceEntryoservices
 
BPoll opoll
 
BSocket onet
 
BSocket onetEvent
 
BSocketAddressINET onetEventAddress
 
BString ohostName
 

Detailed Description

Boap server.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NOTHREADS 
THREADED 

Constructor & Destructor Documentation

◆ BoapServer() [1/2]

BoapServer::BoapServer ( )

◆ ~BoapServer()

BoapServer::~BoapServer ( )
virtual

◆ BoapServer() [2/2]

BoapServer::BoapServer ( )

Member Function Documentation

◆ init() [1/2]

BError BoapServer::init ( BString  boapNsHost = "",
int  port = 0,
int  threaded = 0,
int  isBoapns = 0 
)
virtual

◆ run() [1/2]

BError BoapServer::run ( int  inThread = 0)
virtual

◆ process() [1/2]

BError BoapServer::process ( BoapServerConnection conn,
BoapPacket rx,
BoapPacket tx 
)
virtual

◆ processEvent() [1/4]

BError BoapServer::processEvent ( BoapPacket rx)
virtual

◆ addObject() [1/2]

BError BoapServer::addObject ( BoapServiceObject object)
virtual

◆ sendEvent() [1/2]

BError BoapServer::sendEvent ( BoapPacket tx)
virtual

◆ processEvent() [2/4]

BError BoapServer::processEvent ( int  fd)
virtual

◆ clientGone()

void BoapServer::clientGone ( BoapServerConnection client)
virtual

◆ getSocket() [1/2]

BSocket & BoapServer::getSocket ( )

◆ getEventSocket() [1/2]

BSocket & BoapServer::getEventSocket ( )

◆ getHostName() [1/2]

BString BoapServer::getHostName ( )

◆ getConnectionsNumber()

int BoapServer::getConnectionsNumber ( )

◆ closeConnections()

void BoapServer::closeConnections ( )

◆ newConnection()

BoapServerConnection * BoapServer::newConnection ( int  fd,
BSocketAddressINET  address 
)
virtual

◆ function()

void * BoapServer::function ( )
protectedvirtual

Reimplemented from BThread.

◆ init() [2/2]

BError BoapServer::init ( int  boapNs = 0)

◆ run() [2/2]

BError BoapServer::run ( )

◆ processEvent() [3/4]

BError BoapServer::processEvent ( BoapPacket rx)

◆ addObject() [2/2]

BError BoapServer::addObject ( BoapServiceObject object)

◆ process() [2/2]

BError BoapServer::process ( int  fd)

◆ sendEvent() [2/2]

BError BoapServer::sendEvent ( BoapPacket tx)

◆ getSocket() [2/2]

BSocket & BoapServer::getSocket ( )

◆ getEventSocket() [2/2]

BSocket & BoapServer::getEventSocket ( )

◆ processEvent() [4/4]

BError BoapServer::processEvent ( int  fd)

◆ getHostName() [2/2]

BString BoapServer::getHostName ( )

Member Data Documentation

◆ olock

BMutex BoapServer::olock
protected

◆ othreaded

int BoapServer::othreaded
protected

◆ oisBoapns

int BoapServer::oisBoapns
protected

◆ oboapns

Boapns::Boapns* BoapServer::oboapns
protected

◆ oclients

BList<BoapServerConnection*> BoapServer::oclients
protected

◆ oclientGoneEvent

BEvent1Int BoapServer::oclientGoneEvent
protected

◆ oservices

BList< BoapServiceEntry > BoapServer::oservices
protected

◆ opoll

BPoll BoapServer::opoll
protected

◆ onet

BSocket BoapServer::onet
protected

◆ onetEvent

BSocket BoapServer::onetEvent
protected

◆ onetEventAddress

BSocketAddressINET BoapServer::onetEventAddress
protected

◆ ohostName

BString BoapServer::ohostName
protected

◆ onumOperations

BUInt64 BoapServer::onumOperations

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