OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_CPP_UDP_SOCKET_H_ | 5 #ifndef PPAPI_CPP_UDP_SOCKET_H_ |
6 #define PPAPI_CPP_UDP_SOCKET_H_ | 6 #define PPAPI_CPP_UDP_SOCKET_H_ |
7 | 7 |
8 #include "ppapi/c/ppb_udp_socket.h" | 8 #include "ppapi/c/ppb_udp_socket.h" |
9 #include "ppapi/cpp/net_address.h" | 9 #include "ppapi/cpp/net_address.h" |
10 #include "ppapi/cpp/pass_ref.h" | 10 #include "ppapi/cpp/pass_ref.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 /// | 149 /// |
150 /// @param[in] name The option to set. | 150 /// @param[in] name The option to set. |
151 /// @param[in] value The option value to set. | 151 /// @param[in] value The option value to set. |
152 /// @param[in] callback A <code>CompletionCallback</code> to be called upon | 152 /// @param[in] callback A <code>CompletionCallback</code> to be called upon |
153 /// completion. | 153 /// completion. |
154 /// | 154 /// |
155 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 155 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
156 int32_t SetOption(PP_UDPSocket_Option name, | 156 int32_t SetOption(PP_UDPSocket_Option name, |
157 const Var& value, | 157 const Var& value, |
158 const CompletionCallback& callback); | 158 const CompletionCallback& callback); |
| 159 |
| 160 /// Joins the multicast group with address specified by <code>group</code> |
| 161 /// parameter, which is expected to be a <code>NetAddress</code> object. |
| 162 /// |
| 163 /// @param[in] group A <code>NetAddress</code> corresponding to the network |
| 164 /// address of the multicast group. |
| 165 /// @param[in] callback A <code>CompletionCallback</code> to be called upon |
| 166 /// completion. |
| 167 /// |
| 168 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 169 int32_t JoinGroup(const NetAddress& group, |
| 170 const CompletionCallback callback); |
| 171 |
| 172 /// Leaves the multicast group with address specified by <code>group</code> |
| 173 /// parameter, which is expected to be a <code>NetAddress</code> object. |
| 174 /// |
| 175 /// @param[in] group A <code>NetAddress</code> corresponding to the network |
| 176 /// address of the multicast group. |
| 177 /// @param[in] callback A <code>CompletionCallback</code> to be called upon |
| 178 /// completion. |
| 179 /// |
| 180 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 181 int32_t LeaveGroup(const NetAddress& group, |
| 182 const CompletionCallback callback); |
159 }; | 183 }; |
160 | 184 |
161 } // namespace pp | 185 } // namespace pp |
162 | 186 |
163 #endif // PPAPI_CPP_UDP_SOCKET_H_ | 187 #endif // PPAPI_CPP_UDP_SOCKET_H_ |
OLD | NEW |