| 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 [generate_thunk] | 10 [generate_thunk] |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 * @param[in] num_bytes The number of bytes to send. | 146 * @param[in] num_bytes The number of bytes to send. |
| 147 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the | 147 * @param[in] addr A <code>PPB_NetAddress</code> resource holding the |
| 148 * destination address. | 148 * destination address. |
| 149 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 149 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 150 * completion. | 150 * completion. |
| 151 * | 151 * |
| 152 * @return A non-negative number on success to indicate how many bytes have | 152 * @return A non-negative number on success to indicate how many bytes have |
| 153 * been sent; otherwise, an error code from <code>pp_errors.h</code>. | 153 * been sent; otherwise, an error code from <code>pp_errors.h</code>. |
| 154 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have | 154 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have |
| 155 * required permissions. | 155 * required permissions. |
| 156 * <code>PP_ERROR_INPROGRESS</code> will be returned if the socket is busy |
| 157 * sending. The caller should wait until a pending send completes before |
| 158 * retrying. |
| 156 */ | 159 */ |
| 157 int32_t SendTo([in] PP_Resource udp_socket, | 160 int32_t SendTo([in] PP_Resource udp_socket, |
| 158 [in] str_t buffer, | 161 [in] str_t buffer, |
| 159 [in] int32_t num_bytes, | 162 [in] int32_t num_bytes, |
| 160 [in] PP_Resource addr, | 163 [in] PP_Resource addr, |
| 161 [in] PP_CompletionCallback callback); | 164 [in] PP_CompletionCallback callback); |
| 162 | 165 |
| 163 /** | 166 /** |
| 164 * Cancels all pending reads and writes, and closes the socket. Any pending | 167 * Cancels all pending reads and writes, and closes the socket. Any pending |
| 165 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if | 168 * callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if |
| (...skipping 21 matching lines...) Expand all Loading... |
| 187 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 190 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 188 * completion. | 191 * completion. |
| 189 * | 192 * |
| 190 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 193 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 191 */ | 194 */ |
| 192 int32_t SetOption([in] PP_Resource udp_socket, | 195 int32_t SetOption([in] PP_Resource udp_socket, |
| 193 [in] PP_UDPSocket_Option name, | 196 [in] PP_UDPSocket_Option name, |
| 194 [in] PP_Var value, | 197 [in] PP_Var value, |
| 195 [in] PP_CompletionCallback callback); | 198 [in] PP_CompletionCallback callback); |
| 196 }; | 199 }; |
| OLD | NEW |