Reference

ACE_SPIPE_Acceptor(3)

Defines the format and interface for the listener side of the ACE_SPIPE_Stream.

NAME

ACE_SPIPE_Acceptor - Defines the format and interface for the listener side of the ACE_SPIPE_Stream.

SYNOPSIS

#include <ace/SPIPE_Acceptor.h>
class ACE_SPIPE_Acceptor : public ACE_SPIPE
{
  public:
    ACE_SPIPE_Acceptor (void);
    ACE_SPIPE_Acceptor (
        const ACE_SPIPE_Addr &local_sap,
        int reuse_addr = 1,
        int perms = ACE_DEFAULT_FILE_PERMS
        );
    int open (
        const ACE_SPIPE_Addr &local_sap,
        int reuse_addr = 1,
        int perms = ACE_DEFAULT_FILE_PERMS
        );
    int close (void);
    int remove (void);
    int accept (
        ACE_SPIPE_Stream &ipc_sap_spipe,
        ACE_SPIPE_Addr *remote_addr = 0,
        ACE_Time_Value *timeout = 0,
        int restart = 1,
        int reset_new_handle = 0
        );
    typedef ACE_SPIPE_Addr PEER_ADDR;
    typedef ACE_SPIPE_Stream PEER_STREAM;
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    int create_new_instance (int perms = 0);
    ACE_OVERLAPPED overlapped_;
    ACE_Manual_Event event_;
    char already_connected_;
};

Initialization and termination methods.

ACE_SPIPE_Acceptor (void);

Default constructor.

ACE_SPIPE_Acceptor (
    const ACE_SPIPE_Addr &local_sap,
    int reuse_addr = 1,
    int perms = ACE_DEFAULT_FILE_PERMS
    );

Initiate a passive-mode STREAM pipe listener.

int open (
    const ACE_SPIPE_Addr &local_sap,
    int reuse_addr = 1,
    int perms = ACE_DEFAULT_FILE_PERMS
    );

Initiate a passive-mode STREAM pipe listener.

int close (void);

Close down the passive-mode STREAM pipe listener.

int remove (void);

Remove the underlying mounted pipe from the file system.

Passive connection acceptance method.

int accept (
    ACE_SPIPE_Stream &ipc_sap_spipe,
    ACE_SPIPE_Addr *remote_addr = 0,
    ACE_Time_Value *timeout = 0,
    int restart = 1,
    int reset_new_handle = 0
    );

Accept a new data transfer connection. A timeout of 0 means block forever, a timeout of {0, 0} means poll. restart == 1 means "restart if interrupted."

Meta-type info

typedef ACE_SPIPE_Addr PEER_ADDR;

typedef ACE_SPIPE_Stream PEER_STREAM;

void dump (void) const;

Dump the state of an object.

ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

AUTHOR

Doug Schmidt and Prashant Jain

LIBRARY

ace