Timeout is a simple wrapper around Sptread::sp_time the Spread C API's Spread::sp_time struct that facilitates specifying connection timeouts for the Mailbox constructor. More...
#include <Mailbox.h>
Public Member Functions |
|
| Timeout (const Spread::sp_time time) | |
| Converts a Spread::sp_time instance to a Timeout instance, copying the stored time representation in the process. |
|
| Timeout (const long sec=0, const long usec=0) | |
| Creates a Timeout instance representing a number of seconds plus microseconds. |
|
| operator Spread::sp_time () const | |
| Converts a Timeout instance to a Spread::sp_time instance. |
|
Detailed Description
Timeout is a simple wrapper around Sptread::sp_time the Spread C API's Spread::sp_time struct that facilitates specifying connection timeouts for the Mailbox constructor.
The constructor will convert an integral number into a Timeout instance, allowing you to specify timeouts to the Mailbox constructor as either Timeout instances or a single number (interpreted as a number of seconds).
Constructor & Destructor Documentation
| Timeout::Timeout | ( | const Spread::sp_time | time | ) | [inline] |
| Timeout::Timeout | ( | const long | sec = 0, |
| const long | usec = 0 |
||
| ) | [inline] |
Creates a Timeout instance representing a number of seconds plus microseconds.
The constructor also is able to convert an int or long to a Timeout, interpreting the number as the first constructor argument (the number of seconds).
- Parameters:
-
sec The number of seconds. usec The number of microseconds.
Member Function Documentation
| Timeout::operator Spread::sp_time | ( | ) | const [inline] |
The documentation for this class was generated from the following file: