NAME

ACE_Synch_Options - Contains the values of options used to determine the synchronous and asynchronous behavior. DESCRIPTION = Values support the following behavior (TV == "timeout" and UR == "use ACE_Reactor"): Parameters | Description | TV | UR | -----|----------|------------------------------- | | NULL | yes | infinite timeout (using ACE_Reactor) | | time | yes | try asynch transaction for | | the specified time (using ACE_Reactor) | | 0,0 | yes | poll; try, if EWOULDBLOCK, | | then return immediately | | (using ACE_Reactor) | | NULL | no | block forever (don't use ACE_Reactor) | | time | no | do a blocking transaction | | for the specified time | | (don't use ACE_Reactor) | | 0,0 | no | poll; but do not initiate a | | nonblocking transaction | | (don't use ACE_Reactor)

SYNOPSIS


#include <ace/ACE_Synch_Options.h >


class ACE_Synch_Options
{
  public:
    enum{ USE_REACTOR = 01, USE_TIMEOUT = 02 };
    ACE_Synch_Options (
        u_long options = 0,
        const ACE_Time_Value &timeout = ACE_Time_Value::zero,
        const void *arg = 0
        );
    void set (
        u_long options = 0,
        const ACE_Time_Value &timeout = ACE_Time_Value::zero,
        const void *arg = 0
        );
    int operator[] (u_long option) const;
    void operator= (u_long option);
    const void *arg (void) const;
    void arg (const void *);
    const ACE_Time_Value &timeout (void) const;
    void timeout (ACE_Time_Value &tv);
    const ACE_Time_Value *time_value (void) const;
    static ACE_Synch_Options defaults;
    static ACE_Synch_Options synch;
    static ACE_Synch_Options asynch;
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    u_long options_;
    ACE_Time_Value timeout_;
    const void *arg_;
};

Options flags for controlling synchronization. Note that these

flags can be bit-wise "or'd" together if both options are desired.

Initialization methods.

ACE_Synch_Options (
    u_long options = 0,
    const ACE_Time_Value &timeout = ACE_Time_Value::zero,
    const void *arg = 0
    );
void set (
    u_long options = 0,
    const ACE_Time_Value &timeout = ACE_Time_Value::zero,
    const void *arg = 0
    );
int operator[] (u_long option) const;
void operator= (u_long option);
const void *arg (void) const;
void arg (const void *);
const ACE_Time_Value &timeout (void) const;
void timeout (ACE_Time_Value &tv);
const ACE_Time_Value *time_value (void) const;

Static data members (singletons)

static ACE_Synch_Options defaults;
static ACE_Synch_Options synch;
static ACE_Synch_Options asynch;
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Doug Schmidt

LIBRARY

ace