Restore build on FreeBSD.
[getmangos.git] / dep / ACE_wrappers / ace / LSOCK_Acceptor.h
blobf5a4067ca0a081f52f011312b5ac74353bf3bb7a
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file LSOCK_Acceptor.h
7 * $Id: LSOCK_Acceptor.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
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)
21 # 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
32 // Forward decl.
33 class ACE_Reactor;
35 /**
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
43 public:
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,
50 int reuse_addr = 0,
51 int protocol_family = PF_UNIX,
52 int backlog = ACE_DEFAULT_BACKLOG,
53 int protocol = 0);
55 /// Initiate a passive mode socket.
56 int open (const ACE_Addr &local_sap,
57 int reuse_addr = 0,
58 int protocol_family = PF_UNIX,
59 int backlog = ACE_DEFAULT_BACKLOG,
60 int protocol = 0);
62 /// Accept a new data transfer connection.
63 int accept (ACE_LSOCK_Stream &new_ipc_sap,
64 ACE_Addr * = 0,
65 ACE_Time_Value *timeout = 0,
66 int restart = 1,
67 int reset_new_handle = 0) const;
69 /// Close down the ACE_LSOCK and remove the rendezvous point from the
70 /// file system.
71 int remove (void);
73 /// Return the local endpoint address.
74 int get_local_addr (ACE_Addr &) const;
76 // = Meta-type info
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;
86 private:
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 */