---
name: "ACE_Service_Handler"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Service_Handler"
---

# ACE\_Service\_Handler(3)

This base class defines the interface for the ACE\_Asynch\_Acceptor to call into when new connection are accepted.

## 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
