3 //=============================================================================
5 * @file LSOCK_Connector.h
7 * $Id: LSOCK_Connector.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt <schmidt@cs.wustl.edu>
11 //=============================================================================
13 #ifndef ACE_LOCAL_SOCK_CONNECTOR_H
14 #define ACE_LOCAL_SOCK_CONNECTOR_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/config-all.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
25 #include "ace/SOCK_Connector.h"
26 #include "ace/LSOCK_Stream.h"
27 #include "ace/UNIX_Addr.h"
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 * @class ACE_LSOCK_Connector
34 * @brief Defines the format and interface for the connector side of
35 * the ACE_LSOCK_Stream.
37 class ACE_Export ACE_LSOCK_Connector
: public ACE_SOCK_Connector
40 // = Initialization methods.
41 /// Default constructor.
42 ACE_LSOCK_Connector (void);
45 * Actively connect and produce a @a new_stream if things go well.
46 * All arguments are relayed to the ACE_SOCK_Connector constructor
48 * @see ACE_SOCK_Connector().
50 ACE_LSOCK_Connector (ACE_LSOCK_Stream
&new_stream
,
51 const ACE_UNIX_Addr
&remote_sap
,
52 ACE_Time_Value
*timeout
= 0,
53 const ACE_Addr
&local_sap
= ACE_Addr::sap_any
,
59 * Actively connect and produce a @a new_stream if things go well.
60 * The @c ACE_SOCK_Connector::connect() method is called to perform
61 * the actual connection attempt.
62 * @see ACE_SOCK_Connector::connect().
64 int connect (ACE_LSOCK_Stream
&new_stream
,
65 const ACE_UNIX_Addr
&remote_sap
,
66 ACE_Time_Value
*timeout
= 0,
67 const ACE_Addr
&local_sap
= ACE_Addr::sap_any
,
73 typedef ACE_UNIX_Addr PEER_ADDR
;
74 typedef ACE_LSOCK_Stream PEER_STREAM
;
76 /// Dump the state of an object.
77 void dump (void) const;
79 /// Declare the dynamic allocation hooks.
80 ACE_ALLOC_HOOK_DECLARE
;
83 ACE_END_VERSIONED_NAMESPACE_DECL
85 #if defined (__ACE_INLINE__)
86 #include "ace/LSOCK_Connector.inl"
87 #endif /* __ACE_INLINE__ */
89 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
90 #include /**/ "ace/post.h"
91 #endif /* ACE_LOCAL_SOCK_CONNECTOR_H */