#include <ace/MEM_Addr.h>
class ACE_MEM_Addr : public ACE_Addr {
public:
ACE_MEM_Addr (void);
ACE_MEM_Addr (const ACE_MEM_Addr &);
ACE_MEM_Addr (u_short port_number);
ACE_MEM_Addr (const ASYS_TCHAR port_name[]);
~ACE_MEM_Addr (void);
int initialize_local (u_short port);
int same_host (const ACE_INET_Addr& sap);
int set (u_short port_number, int encode = 1);
int set (const ASYS_TCHAR port_name[]);
virtual void *get_addr (void) const;
virtual void set_addr (void *, int len);
virtual int addr_to_string ( ASYS_TCHAR buffer[], size_t size, int ipaddr_format = 1 ) const;
virtual int string_to_addr (const ASYS_TCHAR address[]);
void set_port_number (u_short, int encode = 1);
u_short get_port_number (void) const;
int get_host_name ( ASYS_TCHAR hostname[], size_t hostnamelen ) const;
const ASYS_TCHAR *get_host_name (void) const;
const char *get_host_addr (void) const;
ACE_UINT32 get_ip_address (void) const;
const ACE_INET_Addr &get_remote_addr (void) const;
const ACE_INET_Addr &get_local_addr (void) const;
int operator == (const ACE_MEM_Addr &SAP) const;
int operator == (const ACE_INET_Addr &SAP) const;
int operator != (const ACE_MEM_Addr &SAP) const;
int operator != (const ACE_INET_Addr &SAP) const;
virtual u_long hash (void) const;
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
ACE_INET_Addr external_;
ACE_INET_Addr internal_;
};
ACE_MEM_Addr (void);
ACE_MEM_Addr (const ACE_MEM_Addr &);
ACE_MEM_Addr (u_short port_number);
ACE_INET_Addr
from a port_number
and the remote
host_name
.
ACE_MEM_Addr (const ASYS_TCHAR port_name[]);
ACE_INET_Addr
from a port_name
.
~ACE_MEM_Addr (void);
int initialize_local (u_short port);
int same_host (const ACE_INET_Addr& sap);
sap
designate an enpoint withing the same host.
These methods are useful after the object has been constructed.
int set (u_short port_number, int encode = 1);
ACE_INET_Addr
from a port_number
and the
remote host_name
. If encode
is enabled then port_number
is
converted into network byte order, otherwise it is assumed to be
in network byte order already and are passed straight through.
int set (const ASYS_TCHAR port_name[]);
getservbyname
to initialize an ACE_INET_Addr
from a
port_name
, the remote host_name
, and the protocol
.
virtual void *get_addr (void) const;
virtual void set_addr (void *, int len);
virtual int addr_to_string (
ASYS_TCHAR buffer[],
size_t size,
int ipaddr_format = 1
) const;
ACE_INET_Addr
address into string
format.
virtual int string_to_addr (const ASYS_TCHAR address[]);
ACE_INET_Addr
from the address
.
void set_port_number (u_short, int encode = 1);
u_short get_port_number (void) const;
int get_host_name (ASYS_TCHAR hostname[], size_t hostnamelen) const;
const ASYS_TCHAR *get_host_name (void) const;
const char *get_host_addr (void) const;
ACE_UINT32 get_ip_address (void) const;
const ACE_INET_Addr &get_remote_addr (void) const;
const ACE_INET_Addr &get_local_addr (void) const;
int operator == (const ACE_MEM_Addr &SAP) const;
int operator == (const ACE_INET_Addr &SAP) const;
int operator != (const ACE_MEM_Addr &SAP) const;
int operator != (const ACE_INET_Addr &SAP) const;
virtual u_long hash (void) const;
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
nanbor@cs.wustl.edu