psocksxx::iosocks Class Reference

base class for socket stream controller classes More...

`#include <iosocks.h>`

Inheritance diagram for psocksxx::iosocks:

## Public Member Functions

virtual | ~iosocks () throw ()
| destructor More...
bool | timedout () const throw ()
| get the timed-out status flag value More...
const timeval * | timeout (time_t sec, suseconds_t usec) throw ()
| set the timeout value for stream communications More...
void * | clear_timeout () throw ()
| clear the timeout value More...

## Protected Member Functions

| iosocks () throw ()
| empty default constructor More...

## Detailed Description

base class for socket stream controller classes

This class holds the common methods for socket stream controller classes.

## Constructor & Destructor Documentation

virtual psocksxx::iosocks::~iosocks | ( |  | ) |
throw | ( |
| ) |  |

inline virtual

destructor

Does nothing.

psocksxx::iosocks::iosocks | ( |  | ) |
throw | ( |
| ) |  |

inline protected

empty default constructor

Empty default constructor so that derived classes through virtual inheritance does not have to call the constructor.

## Member Function Documentation

void * psocksxx::iosocks::clear_timeout | ( |  | ) |
throw | ( |
| ) |  |

clear the timeout value

Returns
  a reference to the internal timeout structure which will always be a null-pointer (`0`) after clearing the timeout

This will clear any timeout values set for this stream using timeout().

bool psocksxx::iosocks::timedout | ( |  | ) | const
throw | ( |
| ) |  |

get the timed-out status flag value

Returns
  boolean `true` if timed-out flag is set or `false` otherwise.

Returns the timed-out status for the associated socket stream buffer.

const timeval * psocksxx::iosocks::timeout | ( | time_t | sec,
|  | suseconds_t | usec
| ) |  |
throw | ( |
| ) |  |

set the timeout value for stream communications

Parameters

  sec | seconds
  usec | microseconds

Returns
  a reference to the internal timeout structure

Wrapper method for sockstreambuf::timeout() to set the timeout value for stream communications.

See also
  sockstreambuf::timeout()