NAME
ACE_Name_Server -
Integrate the various components that implement the ACE_Name
Server.
SYNOPSIS
#include <ACE/ACE_Name_Server.h>
class ACE_Name_Server :
public ACE_Acceptor<ACE_Name_Handler, ACE_SOCK_ACCEPTOR>
{
public:
ACE_Name_Server (int argc, char *argv[]);
int run (void);
private:
virtual int handle_signal (
int signum ,
siginfo_t *,
ucontext_t *
);
ACE_Name_Handler *make_svc_handler (void);
int parse_args (int argc, char *argv[]);
u_short server_port_;
sig_atomic_t done_;
ACE_INET_Addr addr_;
};
DESCRIPTION
The ACE_Name_Server listens to a port number. When a
connection arrives, the ACE_Name_Acceptor creates a new
ACE_Name_Handler (one per connection). The
ACE_Name_Handler processes all requests from a client to
bind, rebind, resolve, and unbind a name. The
ACE_Name_Server shuts down gracefully on SIGINT.
PUBLIC MEMBERS
ACE_Name_Server (int argc, char *argv[]);
Initialize the test server.
int run (void);
PRIVATE MEMBERS
virtual int handle_signal (int signum , siginfo_t *, ucontext_t * );
ACE_Name_Handler *make_svc_handler (void);
Factory method that creates a new ACE_Name_Handler.
int parse_args (int argc, char *argv[]);
Parse the command line and set the options.
u_short server_port_;
Port number for the server.
sig_atomic_t done_;
Used to shut down the server gracefully when a SIGINT occurs.
ACE_INET_Addr addr_;
Address that the ACE_Name_Server uses to listen for connections.
DESCRIPTION
Main class that integrates all the components of the ACE_Name Server.
AUTHOR
Gerhard Lenzer, Douglas C. Schmidt, and Prashant Jain
LIBRARY
ACE