[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / SOCK_CODgram.h
blob0788f871091fe082c17c6f9f6bb11f8eb19f25d6
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file SOCK_CODgram.h
7 * $Id: SOCK_CODgram.h 81509 2008-04-28 22:00:49Z shuston $
9 * @author Doug Schmidt
11 //=============================================================================
14 #ifndef ACE_SOCK_CODGRAM_H
15 #define ACE_SOCK_CODGRAM_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/ACE_export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/SOCK_IO.h"
25 #include "ace/Addr.h"
26 #include "ace/INET_Addr.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 /**
31 * @class ACE_SOCK_CODgram
33 * @brief Defines the member functions for the ACE_SOCK connected
34 * datagram abstraction.
36 class ACE_Export ACE_SOCK_CODgram : public ACE_SOCK_IO
38 public:
39 /// Default constructor.
40 ACE_SOCK_CODgram (void);
42 /**
43 * Constructor with addresses specified. Calls open().
44 * This constructor binds and/or connects to a specified address,
45 * optionally binding an unused port number.
47 * @param remote_sap The remote address.
48 * @param local_sap The local address.
49 * @param protocol_family The protocol family for the new socket. If
50 * either @p remote_sap or @p local_sap is
51 * specified (i.e., not ACE_Addr::sap_any) its
52 * address type is used instead of this value.
53 * If both addresses are specified, their address
54 * types must match. If neither address is specified,
55 * the platform's default IP address type is used.
56 * @param protocol Protocol value for the new socket.
57 * @param reuse_addr Reuse the local address or not.
59 * There are four possible combinations of remote_sap and local_sap. The
60 * behavior in these combinations is:
62 * @li <b>remote_addr == ACE_Addr::sap_any && local_addr == ACE_Addr::sap_any:</b>
63 * If @p protocol_family specifies PF_INET or PF_INET6,
64 * bind the local address to a randomly generated port number.
66 * @li <b>remote_addr == ACE_Addr::sap_any && local_addr != ACE_Addr::sap_any:</b>
67 * Bind the local address (used primarily by servers).
69 * @li <b>remote_addr != ACE_Addr::sap_any && local_addr == ACE_Addr::sap_any:</b>
70 * Connect to the remote address without binding a local address
71 * (used primarily by clients).
73 * @li <b>remote_addr != ACE_Addr::sap_any && local_addr != ACE_Addr::sap_any:</b>
74 * Bind to the local address and connect to the remote address.
76 ACE_SOCK_CODgram (const ACE_Addr &remote_sap,
77 const ACE_Addr &local_sap = ACE_Addr::sap_any,
78 int protocol_family = ACE_PROTOCOL_FAMILY_INET,
79 int protocol = 0,
80 int reuse_addr = 0);
82 /// Default dtor.
83 ~ACE_SOCK_CODgram (void);
85 // Initiate a connected dgram.
87 /**
88 * Initiate a connected datagram socket, optionally binding an
89 * unused port number.
91 * @param remote_sap The remote address.
92 * @param local_sap The local address.
93 * @param protocol_family The protocol family for the new socket. If
94 * either @p remote_sap or @p local_sap is
95 * specified (i.e., not ACE_Addr::sap_any) its
96 * address type is used instead of this value.
97 * If both addresses are specified, their address
98 * types must match. If neither address is specified,
99 * the platform's default IP address type is used.
100 * @param protocol Protocol value for the new socket.
101 * @param reuse_addr Reuse the local address or not.
103 * There are four possible combinations of remote_sap and local_sap. The
104 * behavior in these combinations is:
106 * @li <b>remote_addr == ACE_Addr::sap_any && local_addr == ACE_Addr::sap_any:</b>
107 * If @p protocol_family specifies PF_INET or PF_INET6,
108 * bind the local address to a randomly generated port number.
110 * @li <b>remote_addr == ACE_Addr::sap_any && local_addr != ACE_Addr::sap_any:</b>
111 * Bind the local address (used primarily by servers).
113 * @li <b>remote_addr != ACE_Addr::sap_any && local_addr == ACE_Addr::sap_any:</b>
114 * Connect to the remote address without binding a local address
115 * (used primarily by clients).
117 * @li <b>remote_addr != ACE_Addr::sap_any && local_addr != ACE_Addr::sap_any:</b>
118 * Bind to the local address and connect to the remote address.
120 int open (const ACE_Addr &remote_sap,
121 const ACE_Addr &local_sap = ACE_Addr::sap_any,
122 int protocol_family = ACE_PROTOCOL_FAMILY_INET,
123 int protocol = 0,
124 int reuse_addr = 0);
126 // = Meta-type info.
127 typedef ACE_INET_Addr PEER_ADDR;
129 /// Dump the state of an object.
130 void dump (void) const;
132 /// Declare the dynamic allocation hooks.
133 ACE_ALLOC_HOOK_DECLARE;
136 ACE_END_VERSIONED_NAMESPACE_DECL
138 #if defined (__ACE_INLINE__)
139 #include "ace/SOCK_CODgram.inl"
140 #endif /* __ACE_INLINE__ */
142 #include /**/ "ace/post.h"
143 #endif /* ACE_SOCK_CODGRAM_H */