| 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 | 5 |
| 6 /* From ppb_udp_socket.idl modified Wed Dec 10 04:11:03 2014. */ | 6 /* From ppb_udp_socket.idl modified Wed Jan 14 13:13:19 2015. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_UDP_SOCKET_H_ | 8 #ifndef PPAPI_C_PPB_UDP_SOCKET_H_ |
| 9 #define PPAPI_C_PPB_UDP_SOCKET_H_ | 9 #define PPAPI_C_PPB_UDP_SOCKET_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 * @param[in] num_bytes The number of bytes to send. | 167 * @param[in] num_bytes The number of bytes to send. |
| 168 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the | 168 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the |
| 169 * destination address. | 169 * destination address. |
| 170 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 170 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 171 * completion. | 171 * completion. |
| 172 * | 172 * |
| 173 * @return A non-negative number on success to indicate how many bytes have | 173 * @return A non-negative number on success to indicate how many bytes have |
| 174 * been sent; otherwise, an error code from <code>pp_errors.h</code>. | 174 * been sent; otherwise, an error code from <code>pp_errors.h</code>. |
| 175 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have | 175 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have |
| 176 * required permissions. | 176 * required permissions. |
| 177 * <code>PP_ERROR_INPROGRESS</code> will be returned if the socket is busy |
| 178 * sending. The caller should wait until a pending send completes before |
| 179 * retrying. |
| 177 */ | 180 */ |
| 178 int32_t (*SendTo)(PP_Resource udp_socket, | 181 int32_t (*SendTo)(PP_Resource udp_socket, |
| 179 const char* buffer, | 182 const char* buffer, |
| 180 int32_t num_bytes, | 183 int32_t num_bytes, |
| 181 PP_Resource addr, | 184 PP_Resource addr, |
| 182 struct PP_CompletionCallback callback); | 185 struct PP_CompletionCallback callback); |
| 183 /** | 186 /** |
| 184 * Cancels all pending reads and writes, and closes the socket. Any pending | 187 * Cancels all pending reads and writes, and closes the socket. Any pending |
| 185 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if | 188 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if |
| 186 * pending IO was interrupted. After a call to this method, no output | 189 * pending IO was interrupted. After a call to this method, no output |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 PP_UDPSocket_Option name, | 241 PP_UDPSocket_Option name, |
| 239 struct PP_Var value, | 242 struct PP_Var value, |
| 240 struct PP_CompletionCallback callback); | 243 struct PP_CompletionCallback callback); |
| 241 }; | 244 }; |
| 242 /** | 245 /** |
| 243 * @} | 246 * @} |
| 244 */ | 247 */ |
| 245 | 248 |
| 246 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ | 249 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ |
| 247 | 250 |
| OLD | NEW |