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_TCPSocket_Private</code> interface. | 7 * This file defines the <code>PPB_TCPSocket_Private</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M17 = 0.3, | 11 M17 = 0.3, |
12 M20 = 0.4 | 12 M20 = 0.4, |
| 13 M27 = 0.5 |
| 14 }; |
| 15 |
| 16 [assert_size(4)] |
| 17 enum PP_TCPSocketOption_Private { |
| 18 // Special value used for testing. Guaranteed to fail SetOption(). |
| 19 PP_TCPSOCKETOPTION_INVALID = 0, |
| 20 |
| 21 // Disable coalescing of small writes to make TCP segments, and instead |
| 22 // deliver data immediately. For SSL sockets, this option must be set before |
| 23 // SSLHandshake() is called. Value type is PP_VARTYPE_BOOL. |
| 24 PP_TCPSOCKETOPTION_NO_DELAY = 1 |
13 }; | 25 }; |
14 | 26 |
15 /** | 27 /** |
16 * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket | 28 * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket |
17 * operations. | 29 * operations. |
18 */ | 30 */ |
19 interface PPB_TCPSocket_Private { | 31 interface PPB_TCPSocket_Private { |
20 /** | 32 /** |
21 * Allocates a TCP socket resource. | 33 * Allocates a TCP socket resource. |
22 */ | 34 */ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 139 |
128 /** | 140 /** |
129 * Cancels any IO that may be pending, and disconnects the socket. Any pending | 141 * Cancels any IO that may be pending, and disconnects the socket. Any pending |
130 * callbacks will still run, reporting PP_Error_Aborted if pending IO was | 142 * callbacks will still run, reporting PP_Error_Aborted if pending IO was |
131 * interrupted. It is NOT valid to call Connect() again after a call to this | 143 * interrupted. It is NOT valid to call Connect() again after a call to this |
132 * method. Note: If the socket is destroyed when it is still connected, then | 144 * method. Note: If the socket is destroyed when it is still connected, then |
133 * it will be implicitly disconnected, so you are not required to call this | 145 * it will be implicitly disconnected, so you are not required to call this |
134 * method. | 146 * method. |
135 */ | 147 */ |
136 void Disconnect([in] PP_Resource tcp_socket); | 148 void Disconnect([in] PP_Resource tcp_socket); |
| 149 |
| 150 /** |
| 151 * Sets an option on |tcp_socket|. Supported |name| and |value| parameters |
| 152 * are as described for PP_TCPSocketOption_Private. |callback| will be |
| 153 * invoked with PP_OK if setting the option succeeds, or an error code |
| 154 * otherwise. The socket must be connection before SetOption is called. |
| 155 */ |
| 156 [version=0.5] |
| 157 int32_t SetOption([in] PP_Resource tcp_socket, |
| 158 [in] PP_TCPSocketOption_Private name, |
| 159 [in] PP_Var value, |
| 160 [in] PP_CompletionCallback callback); |
| 161 |
137 }; | 162 }; |
OLD | NEW |