vdr 2.8.3
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 cIpAddress * LastIpAddress (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 102 of file svdrp.c.

Constructor & Destructor Documentation

◆ cSocket()

cSocket::cSocket ( int Port,
bool Tcp )

Definition at line 122 of file svdrp.c.

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

◆ ~cSocket()

cSocket::~cSocket ( )

Definition at line 129 of file svdrp.c.

References Close().

Member Function Documentation

◆ Accept()

◆ Close()

void cSocket::Close ( void )

◆ Connect()

bool cSocket::Connect ( const char * Address)

Definition at line 192 of file svdrp.c.

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

Referenced by cSVDRPClient::cSVDRPClient().

◆ Discover()

◆ LastIpAddress()

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

◆ Listen()

bool cSocket::Listen ( void )

◆ Port()

int cSocket::Port ( void ) const
inline

Definition at line 114 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 236 of file svdrp.c.

References dbgsvdrp, LOG_ERROR, Port(), and Socket().

Referenced by cSVDRPClientHandler::SendDiscover().

◆ Socket()

int cSocket::Socket ( void ) const
inline

Member Data Documentation

◆ lastIpAddress

cIpAddress cSocket::lastIpAddress
private

Definition at line 107 of file svdrp.c.

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

◆ port

int cSocket::port
private

Definition at line 104 of file svdrp.c.

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

◆ sock

int cSocket::sock
private

Definition at line 106 of file svdrp.c.

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

◆ tcp

bool cSocket::tcp
private

Definition at line 105 of file svdrp.c.

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


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