| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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_WebSocket</code> interface providing | 7 * This file defines the <code>PPB_WebSocket</code> interface providing |
| 8 * bi-directional, full-duplex, communications over a single TCP socket. | 8 * bi-directional, full-duplex, communications over a single TCP socket. |
| 9 */ | 9 */ |
| 10 label Chrome { | 10 label Chrome { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 * connection. | 262 * connection. |
| 263 * | 263 * |
| 264 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 264 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 265 * Returns <code>PP_ERROR_BADARGUMENT</code> if <code>reason</code> contains | 265 * Returns <code>PP_ERROR_BADARGUMENT</code> if <code>reason</code> contains |
| 266 * an invalid character as a UTF-8 string, or is longer than 123 bytes. | 266 * an invalid character as a UTF-8 string, or is longer than 123 bytes. |
| 267 * <code>PP_ERROR_BADARGUMENT</code> corresponds to a JavaScript SyntaxError | 267 * <code>PP_ERROR_BADARGUMENT</code> corresponds to a JavaScript SyntaxError |
| 268 * in the WebSocket API specification. | 268 * in the WebSocket API specification. |
| 269 * Returns <code>PP_ERROR_NOACCESS</code> if the code is not an integer | 269 * Returns <code>PP_ERROR_NOACCESS</code> if the code is not an integer |
| 270 * equal to 1000 or in the range 3000 to 4999. <code>PP_ERROR_NOACCESS</code> | 270 * equal to 1000 or in the range 3000 to 4999. <code>PP_ERROR_NOACCESS</code> |
| 271 * corresponds to an InvalidAccessError in the WebSocket API specification. | 271 * corresponds to an InvalidAccessError in the WebSocket API specification. |
| 272 * Returns <code>PP_ERROR_INPROGRESS</code> if this is not the first call to | 272 * Returns <code>PP_ERROR_INPROGRESS</code> if a previous call to Close() is |
| 273 * Close(). | 273 * not finished. |
| 274 */ | 274 */ |
| 275 int32_t Close([in] PP_Resource web_socket, | 275 int32_t Close([in] PP_Resource web_socket, |
| 276 [in] uint16_t code, | 276 [in] uint16_t code, |
| 277 [in] PP_Var reason, | 277 [in] PP_Var reason, |
| 278 [in] PP_CompletionCallback callback); | 278 [in] PP_CompletionCallback callback); |
| 279 | 279 |
| 280 /** | 280 /** |
| 281 * ReceiveMessage() receives a message from the WebSocket server. | 281 * ReceiveMessage() receives a message from the WebSocket server. |
| 282 * This interface only returns a single message. That is, this interface must | 282 * This interface only returns a single message. That is, this interface must |
| 283 * be called at least N times to receive N messages, no matter the size of | 283 * be called at least N times to receive N messages, no matter the size of |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 426 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
| 427 * WebSocket. | 427 * WebSocket. |
| 428 * | 428 * |
| 429 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the | 429 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the |
| 430 * connection is established, the var contains the empty string. Returns a | 430 * connection is established, the var contains the empty string. Returns a |
| 431 * <code>PP_VARTYPE_UNDEFINED</code> if this function is called on an | 431 * <code>PP_VARTYPE_UNDEFINED</code> if this function is called on an |
| 432 * invalid resource. | 432 * invalid resource. |
| 433 */ | 433 */ |
| 434 PP_Var GetURL([in] PP_Resource web_socket); | 434 PP_Var GetURL([in] PP_Resource web_socket); |
| 435 }; | 435 }; |
| OLD | NEW |