LSOCK_Acceptor.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    LSOCK_Acceptor.h
00006  *
00007  *  LSOCK_Acceptor.h,v 4.17 2005/11/26 03:13:13 ossama Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_LOCAL_SOCK_ACCEPTOR_H
00015 #define ACE_LOCAL_SOCK_ACCEPTOR_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00025 
00026 #include "ace/SOCK_Acceptor.h"
00027 #include "ace/UNIX_Addr.h"
00028 #include "ace/LSOCK_Stream.h"
00029 
00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 // Forward decl.
00033 class ACE_Reactor;
00034 
00035 /**
00036  * @class ACE_LSOCK_Acceptor
00037  *
00038  * @brief Defines the format and interface for the acceptor side of the
00039  * local ACE_SOCK ACE_Stream.
00040  */
00041 class ACE_Export ACE_LSOCK_Acceptor : public ACE_SOCK_Acceptor
00042 {
00043 public:
00044   // = Initialization methods.
00045   /// Default constructor.
00046   ACE_LSOCK_Acceptor (void);
00047 
00048   /// Initiate a passive mode socket.
00049   ACE_LSOCK_Acceptor (const ACE_Addr &local_sap,
00050                       int reuse_addr = 0,
00051                       int protocol_family = PF_UNIX,
00052                       int backlog = ACE_DEFAULT_BACKLOG,
00053                       int protocol = 0);
00054 
00055   /// Initiate a passive mode socket.
00056   int open (const ACE_Addr &local_sap,
00057             int reuse_addr = 0,
00058             int protocol_family = PF_UNIX,
00059             int backlog = ACE_DEFAULT_BACKLOG,
00060             int protocol = 0);
00061 
00062   /// Accept a new data transfer connection.
00063   int accept (ACE_LSOCK_Stream &new_ipc_sap,
00064               ACE_Addr * = 0,
00065               ACE_Time_Value *timeout = 0,
00066               int restart = 1,
00067               int reset_new_handle = 0) const;
00068 
00069   /// Close down the ACE_LSOCK and remove the rendezvous point from the
00070   /// file system.
00071   int remove (void);
00072 
00073   /// Return the local endpoint address.
00074   int get_local_addr (ACE_Addr &) const;
00075 
00076   // = Meta-type info
00077   typedef ACE_UNIX_Addr PEER_ADDR;
00078   typedef ACE_LSOCK_Stream PEER_STREAM;
00079 
00080   /// Dump the state of an object.
00081   void dump (void) const;
00082 
00083   /// Declare the dynamic allocation hooks.
00084   ACE_ALLOC_HOOK_DECLARE;
00085 
00086 private:
00087   /// Address of our rendezvous point.
00088   ACE_UNIX_Addr local_addr_;
00089 };
00090 
00091 ACE_END_VERSIONED_NAMESPACE_DECL
00092 
00093 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00094 #include /**/ "ace/post.h"
00095 #endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */

Generated on Thu Nov 9 09:41:53 2006 for ACE by doxygen 1.3.6