Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LSOCK_Acceptor.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    LSOCK_Acceptor.h
00006  *
00007  *  $Id: LSOCK_Acceptor.h,v 1.1.1.4 2003/02/21 18:36:32 chad 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 // Forward decl.
00031 class ACE_Reactor;
00032 
00033 /**
00034  * @class ACE_LSOCK_Acceptor
00035  *
00036  * @brief Defines the format and interface for the acceptor side of the
00037  * local ACE_SOCK ACE_Stream.
00038  */
00039 class ACE_Export ACE_LSOCK_Acceptor : public ACE_SOCK_Acceptor
00040 {
00041 public:
00042   // = Initialization methods.
00043   /// Default constructor.
00044   ACE_LSOCK_Acceptor (void);
00045 
00046   /// Initiate a passive mode socket.
00047   ACE_LSOCK_Acceptor (const ACE_Addr &local_sap,
00048                       int reuse_addr = 0,
00049                       int protocol_family = PF_UNIX,
00050                       int backlog = ACE_DEFAULT_BACKLOG,
00051                       int protocol = 0);
00052 
00053   /// Initiate a passive mode socket.
00054   int open (const ACE_Addr &local_sap,
00055             int reuse_addr = 0,
00056             int protocol_family = PF_UNIX,
00057             int backlog = ACE_DEFAULT_BACKLOG,
00058             int protocol = 0);
00059 
00060   /// Accept a new data transfer connection.
00061   int accept (ACE_LSOCK_Stream &new_ipc_sap,
00062               ACE_Addr * = 0,
00063               ACE_Time_Value *timeout = 0,
00064               int restart = 1,
00065               int reset_new_handle = 0) const;
00066 
00067   /// Close down the ACE_LSOCK and remove the rendezvous point from the
00068   /// file system.
00069   int remove (void);
00070 
00071   /// Return the local endpoint address.
00072   int get_local_addr (ACE_Addr &) const;
00073 
00074   // = Meta-type info
00075   typedef ACE_UNIX_Addr PEER_ADDR;
00076   typedef ACE_LSOCK_Stream PEER_STREAM;
00077 
00078   /// Dump the state of an object.
00079   void dump (void) const;
00080 
00081   /// Declare the dynamic allocation hooks.
00082   ACE_ALLOC_HOOK_DECLARE;
00083 
00084 private:
00085   /// Address of our rendezvous point.
00086   ACE_UNIX_Addr local_addr_;
00087 };
00088 
00089 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00090 #include "ace/post.h"
00091 #endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */

Generated on Mon Jun 16 11:20:02 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002