vdr 2.7.6
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 )

Definition at line 258 of file svdrp.c.

References dbgsvdrp, FATALERRNO, isyslog, lastIpAddress, LOG_ERROR, Setup, sock, SVDRPhosts, and tcp.

◆ Close()

void cSocket::Close ( void )

Definition at line 133 of file svdrp.c.

References sock.

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

◆ Connect()

bool cSocket::Connect ( const char * Address)

Definition at line 188 of file svdrp.c.

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

◆ Discover()

cString cSocket::Discover ( void )

◆ LastIpAddress()

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

Definition at line 118 of file svdrp.c.

References lastIpAddress.

◆ Listen()

bool cSocket::Listen ( void )

Definition at line 141 of file svdrp.c.

References Close(), isyslog, LOG_ERROR, port, Setup, sock, SVDRPhosts, and tcp.

◆ Port()

int cSocket::Port ( void ) const
inline

Definition at line 113 of file svdrp.c.

References port.

Referenced by cSocket(), and SendDgram().

◆ 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, and Socket().

◆ Socket()

int cSocket::Socket ( void ) const
inline

Definition at line 114 of file svdrp.c.

References sock.

Referenced by SendDgram().

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: