Savarese Software Research Corporation
Timeout Class Reference

Timeout is a simple wrapper around Spread::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. More...
 
  Timeout (const long sec=0, const long usec=0)
  Creates a Timeout instance representing a number of seconds plus microseconds. More...
 
  operator Spread::sp_time () const
  Converts a Timeout instance to a Spread::sp_time instance. More...
 

Detailed Description

Timeout is a simple wrapper around Spread::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).

Definition at line 36 of file Mailbox.h.

Constructor & Destructor Documentation

Timeout::Timeout ( const Spread::sp_time  time )
inline

Converts a Spread::sp_time instance to a Timeout instance, copying the stored time representation in the process.

Parameters
time The Spread::sp_time instance to convert.

Definition at line 46 of file Mailbox.h.

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.

Definition at line 57 of file Mailbox.h.

Member Function Documentation

Timeout::operator Spread::sp_time ( ) const
inline

Converts a Timeout instance to a Spread::sp_time instance.

Returns
A Spread::sp_time value representing the same time value.

Definition at line 66 of file Mailbox.h.


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

Savarese Software Research Corporation
Copyright © 2006-2015 Savarese Software Research Corporation. All rights reserved.