| 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 Sat Jun 22 10:56:26 2013. */ | 6 /* From ppb_udp_socket.idl modified Wed Oct 8 14:19:56 2014. */ |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 * @param[in] num_bytes The number of bytes to send. | 161 * @param[in] num_bytes The number of bytes to send. |
| 162 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the | 162 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the |
| 163 * destination address. | 163 * destination address. |
| 164 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 164 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 165 * completion. | 165 * completion. |
| 166 * | 166 * |
| 167 * @return A non-negative number on success to indicate how many bytes have | 167 * @return A non-negative number on success to indicate how many bytes have |
| 168 * been sent; otherwise, an error code from <code>pp_errors.h</code>. | 168 * been sent; otherwise, an error code from <code>pp_errors.h</code>. |
| 169 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have | 169 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have |
| 170 * required permissions. | 170 * required permissions. |
| 171 * <code>PP_ERROR_INPROGRESS</code> will be returned if the socket is busy |
| 172 * sending. The caller should wait until a pending send completes before |
| 173 * retrying. |
| 171 */ | 174 */ |
| 172 int32_t (*SendTo)(PP_Resource udp_socket, | 175 int32_t (*SendTo)(PP_Resource udp_socket, |
| 173 const char* buffer, | 176 const char* buffer, |
| 174 int32_t num_bytes, | 177 int32_t num_bytes, |
| 175 PP_Resource addr, | 178 PP_Resource addr, |
| 176 struct PP_CompletionCallback callback); | 179 struct PP_CompletionCallback callback); |
| 177 /** | 180 /** |
| 178 * Cancels all pending reads and writes, and closes the socket. Any pending | 181 * Cancels all pending reads and writes, and closes the socket. Any pending |
| 179 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if | 182 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if |
| 180 * pending IO was interrupted. After a call to this method, no output | 183 * pending IO was interrupted. After a call to this method, no output |
| (...skipping 27 matching lines...) Expand all Loading... |
| 208 struct PP_CompletionCallback callback); | 211 struct PP_CompletionCallback callback); |
| 209 }; | 212 }; |
| 210 | 213 |
| 211 typedef struct PPB_UDPSocket_1_0 PPB_UDPSocket; | 214 typedef struct PPB_UDPSocket_1_0 PPB_UDPSocket; |
| 212 /** | 215 /** |
| 213 * @} | 216 * @} |
| 214 */ | 217 */ |
| 215 | 218 |
| 216 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ | 219 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ |
| 217 | 220 |
| OLD | NEW |