Document return values
[ACE_TAO.git] / ACE / ace / LSOCK_Acceptor.h
blob8459ba4806ef8190562cff8709b370a2e170ba5c
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file LSOCK_Acceptor.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
12 #ifndef ACE_LOCAL_SOCK_ACCEPTOR_H
13 #define ACE_LOCAL_SOCK_ACCEPTOR_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
24 #include "ace/SOCK_Acceptor.h"
25 #include "ace/UNIX_Addr.h"
26 #include "ace/LSOCK_Stream.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 // Forward decl.
31 class ACE_Reactor;
33 /**
34 * @class ACE_LSOCK_Acceptor
36 * @brief Defines the format and interface for the acceptor side of the
37 * local ACE_SOCK ACE_Stream.
39 class ACE_Export ACE_LSOCK_Acceptor : public ACE_SOCK_Acceptor
41 public:
42 /// Default constructor.
43 ACE_LSOCK_Acceptor ();
45 /// Initiate a passive mode socket.
46 ACE_LSOCK_Acceptor (const ACE_Addr &local_sap,
47 int reuse_addr = 0,
48 int protocol_family = PF_UNIX,
49 int backlog = ACE_DEFAULT_BACKLOG,
50 int protocol = 0);
52 /// Initiate a passive mode socket.
53 int open (const ACE_Addr &local_sap,
54 int reuse_addr = 0,
55 int protocol_family = PF_UNIX,
56 int backlog = ACE_DEFAULT_BACKLOG,
57 int protocol = 0);
59 /// Accept a new data transfer connection.
60 int accept (ACE_LSOCK_Stream &new_ipc_sap,
61 ACE_Addr * = 0,
62 ACE_Time_Value *timeout = 0,
63 bool restart = true,
64 bool reset_new_handle = false) const;
66 /// Close down the ACE_LSOCK and remove the rendezvous point from the
67 /// file system.
68 int remove ();
70 /// Return the local endpoint address.
71 int get_local_addr (ACE_Addr &) const;
73 // = Meta-type info
74 typedef ACE_UNIX_Addr PEER_ADDR;
75 typedef ACE_LSOCK_Stream PEER_STREAM;
77 /// Dump the state of an object.
78 void dump () const;
80 /// Declare the dynamic allocation hooks.
81 ACE_ALLOC_HOOK_DECLARE;
83 private:
84 /// Address of our rendezvous point.
85 ACE_UNIX_Addr local_addr_;
88 ACE_END_VERSIONED_NAMESPACE_DECL
90 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
91 #include /**/ "ace/post.h"
92 #endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */