Marine Library  1.0
C++ library for Linux Networking Development
Public Member Functions | List of all members
ISocket Class Reference
Inheritance diagram for ISocket:
Inheritance graph
[legend]
Collaboration diagram for ISocket:
Collaboration graph
[legend]

Public Member Functions

CSockAddr hostAddr () const
 
const CSockAddrpeerAddr () const
 
bool linger (bool on, int timeoutS=0)
 
bool reuseAddr (bool on)
 
bool recvTimeout (int timeMs)
 
int recvTimeout () const
 
bool sendTimeout (uint32_t timeMs)
 
int sendTimeout () const
 
bool recvBufSize (int size)
 
int recvBufSize () const
 
bool sendBufSize (int size)
 
int sendBufSize () const
 
ssize_t recvData (char *buf, size_t sz, bool waitAll=false)
 
template<class BufT >
ssize_t recvData (BufT &buf, size_t sz, bool waitAll=false)
 
ssize_t sendData (const char *buf, size_t sz)
 
template<class BufT >
ssize_t sendData (const BufT &buf)
 
std::string toString () const
 Get readable description of this object. More...
 
- Public Member Functions inherited from IFileDesc
 IFileDesc ()
 Construct a default object.
 
virtual ~IFileDesc ()
 Destroy this object. More...
 
bool valid () const
 Test if this object is a valid file descriptor. More...
 
int fd () const
 Get fd (file descriptor). More...
 
virtual int fdType () const =0
 Get type id of this object. More...
 
virtual const char * fdTypeName () const =0
 Get type name of this object. More...
 
std::string filename () const
 Get file name opened by this object. More...
 
off_t length () const
 Get byte size of file opened by this object. More...
 
bool deleted () const
 Test if file is deleted. More...
 
bool block (bool on)
 Set block/non-block for operations. More...
 
void close ()
 Close this fd.
 

Additional Inherited Members

- Static Public Member Functions inherited from IFileDesc
static std::string ErrMsg ()
 Get latest errno and error message. More...
 
- Static Public Attributes inherited from IFileDesc
static const int kInvalidFd = -1
 

Member Function Documentation

std::string ISocket::toString ( ) const
inlinevirtual

Get readable description of this object.

Returns
Description string

Reimplemented from IFileDesc.


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