Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / XTI_ATM_Mcast.h
blobbfdfa92c95754f1fca976e367b00b9ccb100c162
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file XTI_ATM_Mcast.h
7 * $Id: XTI_ATM_Mcast.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Joe Hoffert
11 //=============================================================================
14 #ifndef ACE_XTI_ATM_MCAST_H
15 #define ACE_XTI_ATM_MCAST_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #if defined (ACE_HAS_XTI_ATM)
26 #include "ace/TLI_Connector.h"
27 #include "ace/ATM_Addr.h"
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 /**
32 * @class ACE_XTI_ATM_Mcast
34 * @brief Defines an active connection factory for the ACE_TLI C++
35 * wrappers to support XTI/ATM multicast.
37 class ACE_Export ACE_XTI_ATM_Mcast : public ACE_TLI_Connector
39 public:
40 // = Initialization methods.
41 /// Default constructor.
42 ACE_XTI_ATM_Mcast (void);
44 /**
45 * Actively connect and produce a @a new_stream if things go well.
46 * The @a remote_sap is the address that we are trying to connect
47 * with. The @a timeout is the amount of time to wait to connect.
48 * If it's 0 then we block indefinitely. If *timeout == {0, 0} then
49 * the connection is done using non-blocking mode. In this case, if
50 * the connection can't be made immediately the value of -1 is
51 * returned with @c errno == EWOULDBLOCK. If *timeout > {0, 0} then
52 * this is the amount of time to wait before timing out. If the
53 * time expires before the connection is made @c errno == ETIME. The
54 * @a local_sap is the value of local address to bind to. If it's
55 * the default value of ACE_Addr::sap_any then the user is letting
56 * the OS do the binding. If @a reuse_addr == 1 then the
57 * <local_addr> is reused, even if it hasn't been cleanedup yet.
59 ACE_XTI_ATM_Mcast (ACE_TLI_Stream &new_stream,
60 const ACE_Addr &remote_sap,
61 ACE_Time_Value *timeout = 0,
62 const ACE_Addr &local_sap = ACE_Addr::sap_any,
63 int reuse_addr = 0,
64 int flags = O_RDWR,
65 int perms = 0,
66 const char device[] = ACE_XTI_ATM_DEVICE,
67 struct t_info *info = 0,
68 int rw_flag = 1,
69 struct netbuf *udata = 0,
70 struct netbuf *opt = 0);
72 /**
73 * Actively connect and produce a @a new_stream if things go well.
74 * The @a remote_sap is the address that we are trying to connect
75 * with. The @a timeout is the amount of time to wait to connect.
76 * If it's 0 then we block indefinitely. If *timeout == {0, 0} then
77 * the connection is done using non-blocking mode. In this case, if
78 * the connection can't be made immediately the value of -1 is
79 * returned with @c errno == EWOULDBLOCK. If *timeout > {0, 0} then
80 * this is the amount of time to wait before timing out. If the
81 * time expires before the connection is made @c errno == ETIME. The
82 * @a local_sap is the value of local address to bind to. If it's
83 * the default value of ACE_Addr::sap_any then the user is letting
84 * the OS do the binding. If @a reuse_addr == 1 then the
85 * <local_addr> is reused, even if it hasn't been cleanedup yet.
87 int connect (ACE_TLI_Stream &new_stream,
88 const ACE_Addr &remote_sap,
89 ACE_Time_Value *timeout = 0,
90 const ACE_Addr &local_sap = ACE_Addr::sap_any,
91 int reuse_addr = 0,
92 int flags = O_RDWR,
93 int perms = 0,
94 const char device[] = ACE_XTI_ATM_DEVICE,
95 struct t_info *info = 0,
96 int rw_flag = 1,
97 struct netbuf *udata = 0,
98 struct netbuf *opt = 0);
101 * Actively add a leaf to the currently connected stream (i.e.,
102 * multicast). The @a remote_sap is the address of the leaf that we
103 * are trying to add. The @a timeout is the amount of time to wait to
104 * connect. If it's 0 then we block indefinitely. If *timeout ==
105 * {0, 0} then the connection is done using non-blocking mode. In
106 * this case, if the connection can't be made immediately the value
107 * of -1 is returned with @c errno == EWOULDBLOCK. If *timeout >
108 * {0, 0} then this is the amount of time to wait before timing out.
109 * If the time expires before the connection is made @c errno == ETIME.
111 int add_leaf (ACE_TLI_Stream &current_stream,
112 const ACE_Addr &remote_sap,
113 ACE_INT32 leaf_id,
114 ACE_Time_Value *timeout = 0);
116 // = Meta-type info
117 typedef ACE_ATM_Addr PEER_ADDR;
118 typedef ACE_TLI_Stream PEER_STREAM;
120 /// Dump the state of an object.
121 void dump (void) const;
123 /// Declare the dynamic allocation hooks.
124 ACE_ALLOC_HOOK_DECLARE;
127 ACE_END_VERSIONED_NAMESPACE_DECL
129 #if defined (__ACE_INLINE__)
130 #include "ace/XTI_ATM_Mcast.inl"
131 #endif /* __ACE_INLINE__ */
133 #endif /* ACE_HAS_XTI_ATM */
135 #include /**/ "ace/post.h"
137 #endif /* ACE_XTI_ATM_MCAST_H */