Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

clSoundProxy Class Reference

Sound service proxy. More...

#include <SoundProxy.hh>

Collaboration diagram for clSoundProxy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clSoundProxy ()
 ~clSoundProxy ()
int Exec ()
void Stop ()
void * SoundInThread (void *)
void * WaitConnectThread (void *)
void * ServeClientThread (void *)

Private Member Functions

void AddToLog (char, const char *)
void AddToLog (char, const char *, int)
int FindFreeSlot ()

Private Attributes

volatile bool bRun
bool bServeClient [SP_MAXCLIENTS]
int iServerPort
int iServicePort
int iClientSockH [SP_MAXCLIENTS]
char cpLogFile [_POSIX_PATH_MAX+1]
char cpServerHost [SP_SERV_MAXLEN+1]
char * cpFirstMsg
char * cpDataMsg
pthread_t ptidSoundIn
pthread_t ptidWaitConnect
pthread_t ptidServeClient [SP_MAXCLIENTS]
clAlloc FirstMsg
clAlloc DataMsg
clCfgFile Cfg
clCondition CondData
clLogFile Log
clMutex MutexData
clMutex MutexClass

Detailed Description

Sound service proxy.

Note:
See soundsrv2 for architecture description.

Definition at line 49 of file SoundProxy.hh.


Constructor & Destructor Documentation

clSoundProxy::clSoundProxy  ) 
 

Definition at line 144 of file SoundProxy.cc.

References bRun, bServeClient, Cfg, cpDataMsg, cpFirstMsg, cpLogFile, cpServerHost, DataMsg, FirstMsg, clCfgFile::GetInt(), clCfgFile::GetStr(), GLOBAL_HEADER_LEN, iServerPort, iServicePort, Log, clLogFile::Open(), clCfgFile::SetFileName(), SP_BUFFER_SIZE, SP_CFGFILE, SP_DEF_LOGFILE, and SP_MAXCLIENTS.

clSoundProxy::~clSoundProxy  ) 
 

Definition at line 164 of file SoundProxy.cc.


Member Function Documentation

void clSoundProxy::AddToLog char  ,
const char * 
[inline, private]
 

Definition at line 108 of file SoundProxy.cc.

References clLogFile::Add(), Log, and MutexClass.

Referenced by Exec(), ServeClientThread(), SoundInThread(), and WaitConnectThread().

void clSoundProxy::AddToLog char  ,
const char *  ,
int 
[inline, private]
 

Definition at line 116 of file SoundProxy.cc.

References clLogFile::Add(), Log, and MutexClass.

int clSoundProxy::FindFreeSlot  )  [private]
 

Definition at line 125 of file SoundProxy.cc.

References bServeClient, MutexClass, and SP_MAXCLIENTS.

Referenced by WaitConnectThread().

int clSoundProxy::Exec  ) 
 

Definition at line 169 of file SoundProxy.cc.

References AddToLog(), ptidSoundIn, ptidWaitConnect, Stop(), WrapSoundInThread(), and WrapWaitConnectThread().

Referenced by main().

void clSoundProxy::Stop  ) 
 

Definition at line 206 of file SoundProxy.cc.

References bRun, and MutexClass.

Referenced by Exec(), and SoundInThread().

void * clSoundProxy::SoundInThread void *   ) 
 

Definition at line 214 of file SoundProxy.cc.

References AddToLog(), bRun, bRun, clSockOp::Close(), CondData, clSockClie::Connect(), cpDataMsg, cpFirstMsg, cpServerHost, clSockOp::DisableNagle(), clSockOp::GetErrno(), clSockClie::GetErrno(), GLOBAL_HEADER_LEN, iServerPort, MutexClass, MutexData, clSockOp::ReadN(), clSockOp::ReadSelect(), clSockOp::SetHandle(), clSockOp::SetTypeOfService(), clSockOp::Shutdown(), SOp, SP_1ST_MSG_TIMEOUT, SP_BUFFER_SIZE, SP_CONV_BUF_LEN, SP_MSG_TIMEOUT, SP_SCHED_PRIORITY, and Stop().

Referenced by WrapSoundInThread().

void * clSoundProxy::WaitConnectThread void *   ) 
 

Definition at line 301 of file SoundProxy.cc.

References AddToLog(), clSockServ::Bind(), bRun, bServeClient, FindFreeSlot(), iClientSockH, iServicePort, MutexClass, ptidServeClient, SP_WAIT_CONN_TIMEOUT, clSockServ::WaitForConnect(), and WrapServeClientThread().

Referenced by WrapWaitConnectThread().

void * clSoundProxy::ServeClientThread void *   ) 
 

Definition at line 339 of file SoundProxy.cc.

References AddToLog(), bRun, clSockOp::Close(), CondData, cpDataMsg, cpFirstMsg, clSockOp::DisableNagle(), clSockOp::GetErrno(), clSockOp::GetPeerName(), GLOBAL_HEADER_LEN, iClientSockH, MutexClass, MutexData, clSockOp::SetHandle(), clSockOp::SetTypeOfService(), SOp, SP_1ST_MSG_TIMEOUT, SP_BUFFER_SIZE, SP_CONV_BUF_LEN, SP_MSG_TIMEOUT, SP_SCHED_PRIORITY, clSockOp::WriteN(), and clSockOp::WriteSelect().

Referenced by WrapServeClientThread().


Member Data Documentation

volatile bool clSoundProxy::bRun [private]
 

Definition at line 51 of file SoundProxy.hh.

Referenced by clSoundProxy(), ServeClientThread(), SoundInThread(), Stop(), and WaitConnectThread().

bool clSoundProxy::bServeClient[SP_MAXCLIENTS] [private]
 

Definition at line 52 of file SoundProxy.hh.

Referenced by clSoundProxy(), FindFreeSlot(), and WaitConnectThread().

int clSoundProxy::iServerPort [private]
 

Definition at line 53 of file SoundProxy.hh.

Referenced by clSoundProxy(), and SoundInThread().

int clSoundProxy::iServicePort [private]
 

Definition at line 54 of file SoundProxy.hh.

Referenced by clSoundProxy(), and WaitConnectThread().

int clSoundProxy::iClientSockH[SP_MAXCLIENTS] [private]
 

Definition at line 55 of file SoundProxy.hh.

Referenced by ServeClientThread(), and WaitConnectThread().

char clSoundProxy::cpLogFile[_POSIX_PATH_MAX + 1] [private]
 

Definition at line 56 of file SoundProxy.hh.

Referenced by clSoundProxy().

char clSoundProxy::cpServerHost[SP_SERV_MAXLEN + 1] [private]
 

Definition at line 57 of file SoundProxy.hh.

Referenced by clSoundProxy(), and SoundInThread().

char* clSoundProxy::cpFirstMsg [private]
 

Definition at line 58 of file SoundProxy.hh.

Referenced by clSoundProxy(), ServeClientThread(), and SoundInThread().

char* clSoundProxy::cpDataMsg [private]
 

Definition at line 59 of file SoundProxy.hh.

Referenced by clSoundProxy(), ServeClientThread(), and SoundInThread().

pthread_t clSoundProxy::ptidSoundIn [private]
 

Definition at line 60 of file SoundProxy.hh.

Referenced by Exec().

pthread_t clSoundProxy::ptidWaitConnect [private]
 

Definition at line 61 of file SoundProxy.hh.

Referenced by Exec().

pthread_t clSoundProxy::ptidServeClient[SP_MAXCLIENTS] [private]
 

Definition at line 62 of file SoundProxy.hh.

Referenced by WaitConnectThread().

clAlloc clSoundProxy::FirstMsg [private]
 

Definition at line 63 of file SoundProxy.hh.

Referenced by clSoundProxy().

clAlloc clSoundProxy::DataMsg [private]
 

Definition at line 64 of file SoundProxy.hh.

Referenced by clSoundProxy().

clCfgFile clSoundProxy::Cfg [private]
 

Definition at line 65 of file SoundProxy.hh.

Referenced by clSoundProxy().

clCondition clSoundProxy::CondData [private]
 

Definition at line 66 of file SoundProxy.hh.

Referenced by ServeClientThread(), and SoundInThread().

clLogFile clSoundProxy::Log [private]
 

Definition at line 67 of file SoundProxy.hh.

Referenced by AddToLog(), and clSoundProxy().

clMutex clSoundProxy::MutexData [private]
 

Definition at line 68 of file SoundProxy.hh.

Referenced by ServeClientThread(), and SoundInThread().

clMutex clSoundProxy::MutexClass [private]
 

Definition at line 69 of file SoundProxy.hh.

Referenced by AddToLog(), FindFreeSlot(), ServeClientThread(), SoundInThread(), Stop(), and WaitConnectThread().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:23 2003 for HASAS by doxygen 1.3.3