| 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 /** | 6 /** |
| 7 * This file defines the <code>PPB_UDPSocket</code> interface. | 7 * This file defines the <code>PPB_UDPSocket</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 label Chrome { | 10 label Chrome { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 * @param[in] num_bytes The number of bytes to send. | 150 * @param[in] num_bytes The number of bytes to send. |
| 151 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the | 151 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the |
| 152 * destination address. | 152 * destination address. |
| 153 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 153 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 154 * completion. | 154 * completion. |
| 155 * | 155 * |
| 156 * @return A non-negative number on success to indicate how many bytes have | 156 * @return A non-negative number on success to indicate how many bytes have |
| 157 * been sent; otherwise, an error code from <code>pp_errors.h</code>. | 157 * been sent; otherwise, an error code from <code>pp_errors.h</code>. |
| 158 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have | 158 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have |
| 159 * required permissions. | 159 * required permissions. |
| 160 * <code>PP_ERROR_INPROGRESS</code> will be returned if the socket is busy |
| 161 * sending. The caller should wait until a pending send completes before |
| 162 * retrying. |
| 160 */ | 163 */ |
| 161 int32_t SendTo([in] PP_Resource udp_socket, | 164 int32_t SendTo([in] PP_Resource udp_socket, |
| 162 [in] str_t buffer, | 165 [in] str_t buffer, |
| 163 [in] int32_t num_bytes, | 166 [in] int32_t num_bytes, |
| 164 [in] PP_Resource addr, | 167 [in] PP_Resource addr, |
| 165 [in] PP_CompletionCallback callback); | 168 [in] PP_CompletionCallback callback); |
| 166 | 169 |
| 167 /** | 170 /** |
| 168 * Cancels all pending reads and writes, and closes the socket. Any pending | 171 * Cancels all pending reads and writes, and closes the socket. Any pending |
| 169 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if | 172 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 * completion. | 214 * completion. |
| 212 * | 215 * |
| 213 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 216 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 214 */ | 217 */ |
| 215 [version=1.1] | 218 [version=1.1] |
| 216 int32_t SetOption([in] PP_Resource udp_socket, | 219 int32_t SetOption([in] PP_Resource udp_socket, |
| 217 [in] PP_UDPSocket_Option name, | 220 [in] PP_UDPSocket_Option name, |
| 218 [in] PP_Var value, | 221 [in] PP_Var value, |
| 219 [in] PP_CompletionCallback callback); | 222 [in] PP_CompletionCallback callback); |
| 220 }; | 223 }; |
| OLD | NEW |