vdr  2.4.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
cSocket Class Reference

Public Member Functions

 cSocket (int Port, bool Tcp)
 
 ~cSocket ()
 
bool Listen (void)
 
bool Connect (const char *Address)
 
void Close (void)
 
int Port (void) const
 
int Socket (void) const
 
int Accept (void)
 
cString Discover (void)
 
const cIpAddressLastIpAddress (void) const
 

Static Public Member Functions

static bool SendDgram (const char *Dgram, int Port)
 

Private Attributes

int port
 
bool tcp
 
int sock
 
cIpAddress lastIpAddress
 

Detailed Description

Definition at line 101 of file svdrp.c.

Constructor & Destructor Documentation

cSocket::cSocket ( int  Port,
bool  Tcp 
)

Definition at line 121 of file svdrp.c.

References port, Port(), sock, and tcp.

cSocket::~cSocket ( )

Definition at line 128 of file svdrp.c.

References Close().

Member Function Documentation

int cSocket::Accept ( void  )
void cSocket::Close ( void  )
bool cSocket::Connect ( const char *  Address)

Definition at line 188 of file svdrp.c.

References Close(), dbgsvdrp, isyslog, LOG_ERROR, port, Setup, sock, cSetup::SVDRPHostName, and tcp.

Referenced by cSVDRPClient::cSVDRPClient().

cString cSocket::Discover ( void  )
const cIpAddress* cSocket::LastIpAddress ( void  ) const
inline
bool cSocket::Listen ( void  )
int cSocket::Port ( void  ) const
inline

Definition at line 113 of file svdrp.c.

References port.

Referenced by cSocket(), and cSVDRPClientHandler::SendDiscover().

bool cSocket::SendDgram ( const char *  Dgram,
int  Port 
)
static

Definition at line 226 of file svdrp.c.

References dbgsvdrp, dsyslog, LOG_ERROR, Setup, Socket(), and cSetup::SVDRPHostName.

Referenced by cSVDRPClientHandler::SendDiscover().

int cSocket::Socket ( void  ) const
inline

Member Data Documentation

cIpAddress cSocket::lastIpAddress
private

Definition at line 106 of file svdrp.c.

Referenced by Accept(), Discover(), and LastIpAddress().

int cSocket::port
private

Definition at line 103 of file svdrp.c.

Referenced by Connect(), cSocket(), Listen(), and Port().

int cSocket::sock
private

Definition at line 105 of file svdrp.c.

Referenced by Accept(), Close(), Connect(), cSocket(), Discover(), Listen(), and Socket().

bool cSocket::tcp
private

Definition at line 104 of file svdrp.c.

Referenced by Accept(), Connect(), cSocket(), Discover(), and Listen().


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