## NAME

ACE_Service_Handler -

This base class defines the interface for the ACE_Asynch_Acceptor to call into when new connection are accepted.

## SYNOPSIS

    class ACE_Service_Handler : public ACE_Handler
    {
      public:
        friend class ACE_Asynch_Acceptor<ACE_Service_Handler>;
        ACE_Service_Handler (void);
        virtual ~ACE_Service_Handler (void);
        virtual void open (
            ACE_HANDLE new_handle,
            ACE_Message_Block &message_block
            );
        virtual void addresses (
            const ACE_INET_Addr &remote_address,
            const ACE_INET_Addr &local_address
            );
        virtual void act (const void *);
    };

## DESCRIPTION

This works on Win32 (#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) platforms and on POSIX4 platforms with `aio_*` routines (#if defined (ACE_HAS_AIO_CALLS))

On Win32 platforms, the implementation of `ACE_Asynch_Transmit_File` and `ACE_Asynch_Accept` are only supported if ACE_HAS_WINSOCK2 is defined or you are on WinNT 4.0 or higher.

## PUBLIC MEMBERS

    friend class ACE_Asynch_Acceptor<ACE_Service_Handler>;

The Acceptor is the factory and therefore should have special privileges.

    ACE_Service_Handler (void);

A do nothing constructor.

    virtual ~ACE_Service_Handler (void);

Virtual destruction.

    virtual void open (
        ACE_HANDLE new_handle,
        ACE_Message_Block &message_block
        );

`open` is called by ACE_Asynch_Acceptor to initialize a new instance of ACE_Service_Handler that has been created after the a new connection is accepted. The handle for the new connection is passed along with an initial data that may have shown up.

    virtual void addresses (
        const ACE_INET_Addr &remote_address,
        const ACE_INET_Addr &local_address
        );

Called by ACE_Asynch_Acceptor to pass the addresses of the new connections.

    virtual void act (const void *);

Called by ACE_Asynch_Acceptor to pass the act.

## AUTHOR

Irfan Pyarali `irfan@cs.wustl.edu`, Tim Harrison `harrison@cs.wustl.edu` and Alexander Babu Arulanthu `alex@cs.wustl.edu`

## LIBRARY

ace