LSOCK_Connector.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    LSOCK_Connector.h
00006  *
00007  *  LSOCK_Connector.h,v 4.19 2005/11/26 03:13:13 ossama Exp
00008  *
00009  *  @author Doug Schmidt <schmidt@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACE_LOCAL_SOCK_CONNECTOR_H
00014 #define ACE_LOCAL_SOCK_CONNECTOR_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "ace/config-all.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00024 
00025 #include "ace/SOCK_Connector.h"
00026 #include "ace/LSOCK_Stream.h"
00027 #include "ace/UNIX_Addr.h"
00028 
00029 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 /**
00032  * @class ACE_LSOCK_Connector
00033  *
00034  * @brief Defines the format and interface for the connector side of
00035  * the <ACE_LSOCK_Stream>.
00036  */
00037 class ACE_Export ACE_LSOCK_Connector : public ACE_SOCK_Connector
00038 {
00039 public:
00040   // = Initialization methods.
00041   /// Default constructor.
00042   ACE_LSOCK_Connector (void);
00043 
00044   /**
00045    * Actively connect and produce a <new_stream> if things go well.
00046    * All arguments are relayed to the ACE_SOCK_Connector constructor
00047    * for handling.
00048    * @see ACE_SOCK_Connector().
00049    */
00050   ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream,
00051                        const ACE_UNIX_Addr &remote_sap,
00052                        ACE_Time_Value *timeout = 0,
00053                        const ACE_Addr &local_sap = ACE_Addr::sap_any,
00054                        int reuse_addr = 0,
00055                        int flags = 0,
00056                        int perms = 0);
00057 
00058   /**
00059    * Actively connect and produce a <new_stream> if things go well.
00060    * The @c ACE_SOCK_Connector::connect() method is called to perform
00061    * the actual connection attempt.
00062    * @see ACE_SOCK_Connector::connect().
00063    */
00064   int connect (ACE_LSOCK_Stream &new_stream,
00065                const ACE_UNIX_Addr &remote_sap,
00066                ACE_Time_Value *timeout = 0,
00067                const ACE_Addr &local_sap = ACE_Addr::sap_any,
00068                int reuse_addr = 0,
00069                int flags = 0,
00070                int perms = 0);
00071 
00072   // = Meta-type info
00073   typedef ACE_UNIX_Addr PEER_ADDR;
00074   typedef ACE_LSOCK_Stream PEER_STREAM;
00075 
00076   /// Dump the state of an object.
00077   void dump (void) const;
00078 
00079   /// Declare the dynamic allocation hooks.
00080   ACE_ALLOC_HOOK_DECLARE;
00081 };
00082 
00083 ACE_END_VERSIONED_NAMESPACE_DECL
00084 
00085 #if defined (__ACE_INLINE__)
00086 #include "ace/LSOCK_Connector.inl"
00087 #endif /* __ACE_INLINE__ */
00088 
00089 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00090 #include /**/ "ace/post.h"
00091 #endif /* ACE_LOCAL_SOCK_CONNECTOR_H */

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