ocSocket Class Reference

#include <ocSocket.h>

Inheritance diagram for ocSocket:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ocSocket (const char *address, int port)
virtual ~ocSocket ()
bool SetTimeoutTime (size_t seconds, size_t useconds=0)
ssize_t Write (const char *in, size_t amount)
char * Read (size_t amount)
char * ReadLine (size_t amount=4096L)
ssize_t GetAmountRead (void)
string & getError (void)
 ocSocket (const char *address, int port)
virtual ~ocSocket ()
bool SetTimeoutTime (size_t seconds, size_t useconds=0)
ssize_t Write (const char *in, size_t amount)
char * Read (size_t amount)
char * ReadLine (size_t amount=4096L)
ssize_t GetAmountRead (void)
string & getError (void)

Protected Member Functions

void fatal_err (const char *errIn)
void non_fatal_error (const char *errIn)
void fatal_err (const char *errIn)
void non_fatal_error (const char *errIn)

Private Attributes

vector< char > readBuff
string error
struct sockaddr_in serv
int sockfd
ssize_t amountRead
vector< char > readBuff


Detailed Description

Definition at line 33 of file ocSocket.h.


Constructor & Destructor Documentation

ocSocket::ocSocket ( const char *  address,
int  port 
) [inline]

Definition at line 71 of file ocSocket.h.

References fatal_err(), SA, serv, and sockfd.

virtual ocSocket::~ocSocket (  )  [inline, virtual]

Definition at line 90 of file ocSocket.h.

References sockfd.

ocSocket::ocSocket ( const char *  address,
int  port 
) [inline]

Definition at line 71 of file ocSocket.h.

References fatal_err(), SA, serv, and sockfd.

virtual ocSocket::~ocSocket (  )  [inline, virtual]

Definition at line 90 of file ocSocket.h.

References sockfd.


Member Function Documentation

void ocSocket::fatal_err ( const char *  errIn  )  [inline, protected]

Definition at line 52 of file ocSocket.h.

References error.

Referenced by ocSocket(), and Write().

void ocSocket::non_fatal_error ( const char *  errIn  )  [inline, protected]

Definition at line 58 of file ocSocket.h.

References error.

Referenced by oc_IMap::fetchHeaders(), Read(), and ReadLine().

bool ocSocket::SetTimeoutTime ( size_t  seconds,
size_t  useconds = 0 
) [inline]

Definition at line 97 of file ocSocket.h.

References sockfd.

Referenced by main().

ssize_t ocSocket::Write ( const char *  in,
size_t  amount 
) [inline]

char* ocSocket::Read ( size_t  amount  )  [inline]

Definition at line 131 of file ocSocket.h.

References amountRead, non_fatal_error(), readBuff, and sockfd.

char* ocSocket::ReadLine ( size_t  amount = 4096L  )  [inline]

ssize_t ocSocket::GetAmountRead ( void   )  [inline]

Definition at line 229 of file ocSocket.h.

References amountRead.

string& ocSocket::getError ( void   )  [inline]

Definition at line 237 of file ocSocket.h.

References error.

void ocSocket::fatal_err ( const char *  errIn  )  [inline, protected]

Definition at line 52 of file ocSocket.h.

References error.

void ocSocket::non_fatal_error ( const char *  errIn  )  [inline, protected]

Definition at line 58 of file ocSocket.h.

References error.

bool ocSocket::SetTimeoutTime ( size_t  seconds,
size_t  useconds = 0 
) [inline]

Definition at line 97 of file ocSocket.h.

References sockfd.

ssize_t ocSocket::Write ( const char *  in,
size_t  amount 
) [inline]

Definition at line 108 of file ocSocket.h.

References fatal_err(), and sockfd.

char* ocSocket::Read ( size_t  amount  )  [inline]

Definition at line 131 of file ocSocket.h.

References amountRead, non_fatal_error(), readBuff, and sockfd.

char* ocSocket::ReadLine ( size_t  amount = 4096L  )  [inline]

Definition at line 165 of file ocSocket.h.

References amountRead, non_fatal_error(), readBuff, and sockfd.

ssize_t ocSocket::GetAmountRead ( void   )  [inline]

Definition at line 229 of file ocSocket.h.

References amountRead.

string& ocSocket::getError ( void   )  [inline]

Definition at line 237 of file ocSocket.h.

References error.


Member Data Documentation

vector<char> ocSocket::readBuff [private]

Definition at line 39 of file ocSocket.h.

Referenced by Read(), and ReadLine().

string ocSocket::error [private]

Reimplemented in oc_SMTP.

Definition at line 40 of file ocSocket.h.

Referenced by fatal_err(), getError(), and non_fatal_error().

struct sockaddr_in ocSocket::serv [read, private]

Definition at line 43 of file ocSocket.h.

Referenced by ocSocket().

int ocSocket::sockfd [private]

Definition at line 44 of file ocSocket.h.

Referenced by ocSocket(), Read(), ReadLine(), SetTimeoutTime(), Write(), and ~ocSocket().

ssize_t ocSocket::amountRead [private]

Definition at line 47 of file ocSocket.h.

Referenced by GetAmountRead(), Read(), and ReadLine().

vector<char> ocSocket::readBuff [private]

Definition at line 39 of file ocSocket.h.


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

Generated on Sat Aug 15 12:48:31 2009 for w3systemsDevelopment by  doxygen 1.5.5