Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PosixTCPSocket Class Reference

Posix TCP socket implementation. More...

#include <PosixTCPSocket.h>

Inheritance diagram for PosixTCPSocket::

Socket PosixSocket PosixSocket TCPSocket TCPSocket List of all members.

Public Methods

 PosixTCPSocket (u_short port, const char *addr, u_short range)
 ~PosixTCPSocket ()
int open ()
int close ()
int read (void *buf, int len, bool block=true)
int readline (void *buf, int maxlen)
int write (const void *buf, int len, bool block=true)
int shutdown (int mode=2)

Protected Methods

 PosixTCPSocket (int fd)

Protected Attributes

bool _isPassed

Friends

class PosixTCPServerSocket

Detailed Description

Posix TCP socket implementation.

Definition at line 11 of file PosixTCPSocket.h.


Constructor & Destructor Documentation

PosixTCPSocket::PosixTCPSocket int    fd [inline, protected]
 

Definition at line 15 of file PosixTCPSocket.h.

PosixTCPSocket::PosixTCPSocket u_short    port,
const char *    addr,
u_short    range
 

Definition at line 4 of file PosixTCPSocket.cpp.

References PosixSocket::create().

PosixTCPSocket::~PosixTCPSocket  
 

Definition at line 11 of file PosixTCPSocket.cpp.


Member Function Documentation

int PosixTCPSocket::close  
 

Reimplemented from Socket.

Definition at line 24 of file PosixTCPSocket.cpp.

References Socket::close(), and shutdown().

Referenced by TCPInputStream::~TCPInputStream(), and TCPOutputStream::~TCPOutputStream().

int PosixTCPSocket::open  
 

Definition at line 16 of file PosixTCPSocket.cpp.

References PosixSocket::_sockFD, and PosixSocket::connect().

int PosixTCPSocket::read void *    buf,
int    nbytes,
bool    block = true
 

Definition at line 84 of file PosixTCPSocket.cpp.

References PosixSocket::_sockFD.

Referenced by TCPInputStream::read().

int PosixTCPSocket::readline void *    buf,
int    maxlen
 

Definition at line 49 of file PosixTCPSocket.cpp.

References PosixSocket::_sockFD.

int PosixTCPSocket::shutdown int    mode = 2
 

Definition at line 34 of file PosixTCPSocket.cpp.

References PosixSocket::_sockFD.

Referenced by close().

int PosixTCPSocket::write const void *    buf,
int    nbytes,
bool    block = true
 

Definition at line 116 of file PosixTCPSocket.cpp.

References PosixSocket::_sockFD.

Referenced by TCPOutputStream::write().


Friends And Related Function Documentation

friend class PosixTCPServerSocket [friend]
 

Reimplemented in TCPSocket.

Definition at line 12 of file PosixTCPSocket.h.


Member Data Documentation

bool PosixTCPSocket::_isPassed [protected]
 

Definition at line 21 of file PosixTCPSocket.h.


The documentation for this class was generated from the following files:
Generated on Mon Oct 7 09:33:36 2002 for Gaia by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001