vdr 2.6.7
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::cSocket ( int Port,
bool Tcp )

Definition at line 121 of file svdrp.c.

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

◆ ~cSocket()

cSocket::~cSocket ( )

Definition at line 128 of file svdrp.c.

References Close().

Member Function Documentation

◆ Accept()

int cSocket::Accept ( void )

◆ Close()

void cSocket::Close ( void )

◆ Connect()

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().

◆ Discover()

cString cSocket::Discover ( void )

◆ LastIpAddress()

const cIpAddress * cSocket::LastIpAddress ( void ) const
inline

◆ Listen()

bool cSocket::Listen ( void )

◆ Port()

int cSocket::Port ( void ) const
inline

Definition at line 113 of file svdrp.c.

References port.

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

◆ SendDgram()

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

Definition at line 226 of file svdrp.c.

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

Referenced by cSVDRPClientHandler::SendDiscover().

◆ Socket()

int cSocket::Socket ( void ) const
inline

Member Data Documentation

◆ lastIpAddress

cIpAddress cSocket::lastIpAddress
private

Definition at line 106 of file svdrp.c.

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

◆ port

int cSocket::port
private

Definition at line 103 of file svdrp.c.

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

◆ sock

int cSocket::sock
private

Definition at line 105 of file svdrp.c.

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

◆ tcp

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: