[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / UPIPE_Connector.h
blobea4fc2ec7624376ad04caa497ace8e1665676e3c
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file UPIPE_Connector.h
7 * $Id: UPIPE_Connector.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Gerhard Lenzer and Douglas C. Schmidt
11 //=============================================================================
14 #ifndef ACE_UPIPE_CONNECTOR_H
15 #define ACE_UPIPE_CONNECTOR_H
16 #include /**/ "ace/pre.h"
18 #include "ace/UPIPE_Stream.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #if defined (ACE_HAS_THREADS)
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
29 * @class ACE_UPIPE_Connector
31 * @brief Defines an active connection factory for the
32 * ACE_UPIPE_STREAM wrappers.
34 class ACE_Export ACE_UPIPE_Connector
36 public:
37 // = Initialization methods.
38 /// Default constructor.
39 ACE_UPIPE_Connector (void);
41 /**
42 * Actively connect and produce a @a new_stream if things go well.
43 * The @a addr is the address that we are trying to connect
44 * with. The @a timeout is the amount of time to wait to connect.
45 * If it's 0 then we block indefinitely. If *timeout == {0, 0} then
46 * the connection is done using non-blocking mode. In this case, if
47 * the connection can't be made immediately the value of -1 is
48 * returned with @c errno == EWOULDBLOCK. If *timeout > {0, 0} then
49 * this is the maximum amount of time to wait before timing out. If the
50 * time expires before the connection is made @c errno == ETIME. The
51 * @a local_sap is the value of local address to bind to. If it's
52 * the default value of ACE_Addr::sap_any then the user is letting
53 * the OS do the binding. If @a reuse_addr == 1 then the
54 * @a local_addr is reused, even if it hasn't been cleanedup yet.
55 * The @a flags and @a perms arguments are passed down to the open()
56 * method.
58 ACE_UPIPE_Connector (ACE_UPIPE_Stream &new_stream,
59 const ACE_UPIPE_Addr &addr,
60 ACE_Time_Value *timeout = 0,
61 const ACE_Addr &local_sap = ACE_Addr::sap_any,
62 int reuse_addr = 0,
63 int flags = O_RDWR,
64 int perms = 0);
66 /**
67 * Actively connect and produce a @a new_stream if things go well.
68 * The @a addr is the address that we are trying to connect
69 * with. The @a timeout is the amount of time to wait to connect.
70 * If it's 0 then we block indefinitely. If *timeout == {0, 0} then
71 * the connection is done using non-blocking mode. In this case, if
72 * the connection can't be made immediately the value of -1 is
73 * returned with @c errno == EWOULDBLOCK. If *timeout > {0, 0} then
74 * this is the maximum amount of time to wait before timing out. If the
75 * time expires before the connection is made @c errno == ETIME. The
76 * @a local_sap is the value of local address to bind to. If it's
77 * the default value of ACE_Addr::sap_any then the user is letting
78 * the OS do the binding. If @a reuse_addr == 1 then the
79 * @a local_addr is reused, even if it hasn't been cleanedup yet.
80 * The @a flags and @a perms arguments are passed down to the open()
81 * method.
83 int connect (ACE_UPIPE_Stream &new_stream,
84 const ACE_UPIPE_Addr &addr,
85 ACE_Time_Value *timeout = 0,
86 const ACE_Addr &local_sap = ACE_Addr::sap_any,
87 int reuse_addr = 0,
88 int flags = O_RDWR,
89 int perms = 0);
91 /// Resets any event associations on this handle
92 int reset_new_handle (ACE_HANDLE handle);
94 // = Meta-type info
95 typedef ACE_UPIPE_Addr PEER_ADDR;
96 typedef ACE_UPIPE_Stream PEER_STREAM;
98 /// Dump the state of an object.
99 void dump (void) const;
101 /// Declare the dynamic allocation hooks.
102 ACE_ALLOC_HOOK_DECLARE;
105 ACE_END_VERSIONED_NAMESPACE_DECL
107 #if defined (__ACE_INLINE__)
108 #include "ace/UPIPE_Connector.inl"
109 #endif /* __ACE_INLINE__ */
111 #endif /* ACE_HAS_THREADS */
113 #include /**/ "ace/post.h"
115 #endif /* ACE_UPIPE_CONNECTOR_H */