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_TCPSocket</code> interface. | 7 * This file defines the <code>PPB_TCPSocket</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M29 = 1.0, | 11 M29 = 1.0, |
12 M31 = 1.1 | 12 M31 = 1.1 |
13 }; | 13 }; |
14 | 14 |
15 /** | 15 /** |
16 * Option names used by <code>SetOption()</code>. | 16 * Option names used by <code>SetOption()</code>. |
17 */ | 17 */ |
18 [assert_size(4)] | 18 [assert_size(4)] |
19 enum PP_TCPSocket_Option { | 19 enum PP_TCPSocket_Option { |
20 /** | 20 /** |
21 * Disables coalescing of small writes to make TCP segments, and instead | 21 * Disables coalescing of small writes to make TCP segments, and instead |
22 * delivers data immediately. Value's type is <code>PP_VARTYPE_BOOL</code>. | 22 * delivers data immediately. Value's type is <code>PP_VARTYPE_BOOL</code>. |
23 * This option can only be set after a successful <code>Connect()</code> call. | |
24 */ | 23 */ |
25 PP_TCPSOCKET_OPTION_NO_DELAY = 0, | 24 PP_TCPSOCKET_OPTION_NO_DELAY = 0, |
26 | 25 |
27 /** | 26 /** |
28 * Specifies the total per-socket buffer space reserved for sends. Value's | 27 * Specifies the total per-socket buffer space reserved for sends. Value's |
29 * type should be <code>PP_VARTYPE_INT32</code>. | 28 * type should be <code>PP_VARTYPE_INT32</code>. |
30 * This option can only be set after a successful <code>Connect()</code> call. | |
31 * | 29 * |
32 * Note: This is only treated as a hint for the browser to set the buffer | 30 * Note: This is only treated as a hint for the browser to set the buffer |
33 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't | 31 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't |
34 * guarantee it will conform to the size. | 32 * guarantee it will conform to the size. |
35 */ | 33 */ |
36 PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE = 1, | 34 PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE = 1, |
37 | 35 |
38 /** | 36 /** |
39 * Specifies the total per-socket buffer space reserved for receives. Value's | 37 * Specifies the total per-socket buffer space reserved for receives. Value's |
40 * type should be <code>PP_VARTYPE_INT32</code>. | 38 * type should be <code>PP_VARTYPE_INT32</code>. |
41 * This option can only be set after a successful <code>Connect()</code> call. | |
42 * | 39 * |
43 * Note: This is only treated as a hint for the browser to set the buffer | 40 * Note: This is only treated as a hint for the browser to set the buffer |
44 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't | 41 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't |
45 * guarantee it will conform to the size. | 42 * guarantee it will conform to the size. |
46 */ | 43 */ |
47 PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2 | 44 PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2 |
48 }; | 45 }; |
49 | 46 |
50 /** | 47 /** |
51 * The <code>PPB_TCPSocket</code> interface provides TCP socket operations. | 48 * The <code>PPB_TCPSocket</code> interface provides TCP socket operations. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 252 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
256 * completion. | 253 * completion. |
257 * | 254 * |
258 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 255 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
259 */ | 256 */ |
260 int32_t SetOption([in] PP_Resource tcp_socket, | 257 int32_t SetOption([in] PP_Resource tcp_socket, |
261 [in] PP_TCPSocket_Option name, | 258 [in] PP_TCPSocket_Option name, |
262 [in] PP_Var value, | 259 [in] PP_Var value, |
263 [in] PP_CompletionCallback callback); | 260 [in] PP_CompletionCallback callback); |
264 }; | 261 }; |
OLD | NEW |