3 //=============================================================================
5 * @file LSOCK_Acceptor.h
7 * $Id: LSOCK_Acceptor.h 80826 2008-03-04 14:51:23Z wotte $
11 //=============================================================================
14 #ifndef ACE_LOCAL_SOCK_ACCEPTOR_H
15 #define ACE_LOCAL_SOCK_ACCEPTOR_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
26 #include "ace/SOCK_Acceptor.h"
27 #include "ace/UNIX_Addr.h"
28 #include "ace/LSOCK_Stream.h"
30 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
36 * @class ACE_LSOCK_Acceptor
38 * @brief Defines the format and interface for the acceptor side of the
39 * local ACE_SOCK ACE_Stream.
41 class ACE_Export ACE_LSOCK_Acceptor
: public ACE_SOCK_Acceptor
44 // = Initialization methods.
45 /// Default constructor.
46 ACE_LSOCK_Acceptor (void);
48 /// Initiate a passive mode socket.
49 ACE_LSOCK_Acceptor (const ACE_Addr
&local_sap
,
51 int protocol_family
= PF_UNIX
,
52 int backlog
= ACE_DEFAULT_BACKLOG
,
55 /// Initiate a passive mode socket.
56 int open (const ACE_Addr
&local_sap
,
58 int protocol_family
= PF_UNIX
,
59 int backlog
= ACE_DEFAULT_BACKLOG
,
62 /// Accept a new data transfer connection.
63 int accept (ACE_LSOCK_Stream
&new_ipc_sap
,
65 ACE_Time_Value
*timeout
= 0,
67 int reset_new_handle
= 0) const;
69 /// Close down the ACE_LSOCK and remove the rendezvous point from the
73 /// Return the local endpoint address.
74 int get_local_addr (ACE_Addr
&) const;
77 typedef ACE_UNIX_Addr PEER_ADDR
;
78 typedef ACE_LSOCK_Stream PEER_STREAM
;
80 /// Dump the state of an object.
81 void dump (void) const;
83 /// Declare the dynamic allocation hooks.
84 ACE_ALLOC_HOOK_DECLARE
;
87 /// Address of our rendezvous point.
88 ACE_UNIX_Addr local_addr_
;
91 ACE_END_VERSIONED_NAMESPACE_DECL
93 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
94 #include /**/ "ace/post.h"
95 #endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */