Reference

ACE_Connect_Strategy(3)

Defines the interface for specifying an active connection establishment strategy for a SVC_HANDLER.

NAME

ACE_Connect_Strategy - Defines the interface for specifying an active connection establishment strategy for a SVC_HANDLER.

SYNOPSIS

#include <ace/ACE_Strategies_T.h>
template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1>
class ACE_Connect_Strategy
{
  public:
    ACE_Connect_Strategy (void);
    virtual ACE_PEER_CONNECTOR &connector (void) const;
    virtual ~ACE_Connect_Strategy (void);
    virtual int connect_svc_handler (
        SVC_HANDLER *&sh,
        const ACE_PEER_CONNECTOR_ADDR &remote_addr,
        ACE_Time_Value *timeout,
        const ACE_PEER_CONNECTOR_ADDR &local_addr,
        int reuse_addr,
        int flags,
        int perms
        );
    virtual int connect_svc_handler (
        SVC_HANDLER *&sh,
        SVC_HANDLER *&sh_copy,
        const ACE_PEER_CONNECTOR_ADDR &remote_addr,
        ACE_Time_Value *timeout,
        const ACE_PEER_CONNECTOR_ADDR &local_addr,
        int reuse_addr,
        int flags,
        int perms
        );
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  protected:
    ACE_PEER_CONNECTOR connector_;
};

DESCRIPTION

This class provides a strategy that manages active connection establishment to a server.

Initialization and termination methods.

ACE_Connect_Strategy (void);

Default constructor.

virtual ACE_PEER_CONNECTOR &connector (void) const;

Return a reference to the peer_connector_.

virtual ~ACE_Connect_Strategy (void);

Factory method.

virtual int connect_svc_handler (
    SVC_HANDLER *&sh,
    const ACE_PEER_CONNECTOR_ADDR &remote_addr,
    ACE_Time_Value *timeout,
    const ACE_PEER_CONNECTOR_ADDR &local_addr,
    int reuse_addr,
    int flags,
    int perms
    );

The default behavior delegates to the connect method of the PEER_CONNECTOR::connect.

virtual int connect_svc_handler (
    SVC_HANDLER *&sh,
    SVC_HANDLER *&sh_copy,
    const ACE_PEER_CONNECTOR_ADDR &remote_addr,
    ACE_Time_Value *timeout,
    const ACE_PEER_CONNECTOR_ADDR &local_addr,
    int reuse_addr,
    int flags,
    int perms
    );

The default behavior delegates to the connect method of the PEER_CONNECTOR::connect. Please check the documentation in Connector.h for more details.

void dump (void) const;

Dump the state of an object.

ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

AUTHOR

Doug Schmidt

LIBRARY

ace