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 M26 = 0.5 | |
yzshen1
2013/02/08 21:51:11
nit: you probably cannot get it into 26, so this s
Wez
2013/02/10 04:47:02
Done.
| |
14 }; | |
15 | |
16 [assert_size(4)] | |
17 enum PP_TCPSocketFeature_Private { | |
18 // Disable coalescing of small writes to make TCP segments, and instead | |
19 // deliver data immediately. Value type is PP_VARTYPE_BOOL. | |
20 PP_TCPSOCKETFEATURE_NO_DELAY = 0, | |
yzshen1
2013/02/08 21:51:11
it seems good to comment that setting this feature
Wez
2013/02/10 04:47:02
Done.
| |
21 | |
22 // Special value used for testing. Guaranteed to fail SetSocketFeature(). | |
23 PP_TCPSOCKETFEATURE_INVALID = -1 | |
yzshen1
2013/02/08 21:51:11
Please order them by their values.
Wez
2013/02/10 04:47:02
Done.
| |
13 }; | 24 }; |
14 | 25 |
15 /** | 26 /** |
16 * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket | 27 * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket |
17 * operations. | 28 * operations. |
18 */ | 29 */ |
19 interface PPB_TCPSocket_Private { | 30 interface PPB_TCPSocket_Private { |
20 /** | 31 /** |
21 * Allocates a TCP socket resource. | 32 * Allocates a TCP socket resource. |
22 */ | 33 */ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 | 138 |
128 /** | 139 /** |
129 * Cancels any IO that may be pending, and disconnects the socket. Any pending | 140 * 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 | 141 * 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 | 142 * 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 | 143 * 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 | 144 * it will be implicitly disconnected, so you are not required to call this |
134 * method. | 145 * method. |
135 */ | 146 */ |
136 void Disconnect([in] PP_Resource tcp_socket); | 147 void Disconnect([in] PP_Resource tcp_socket); |
148 | |
149 /** | |
150 * Sets an option on |tcp_socket|. Supported |name| and |value| parameters | |
151 * are as described for PP_TCPSocketFeature_Private. |callback| will be | |
152 * invoked with PP_OK if setting the option succeeds, or an error code | |
153 * otherwise. | |
154 */ | |
155 [version=0.5] | |
156 int32_t SetSocketFeature([in] PP_Resource udp_socket, | |
yzshen1
2013/02/08 21:51:11
- nit: I think SetFeature() is clear enough.
- udp
Wez
2013/02/10 04:47:02
SGTM; I'd chosen the function name to match the on
| |
157 [in] PP_TCPSocketFeature_Private name, | |
158 [in] PP_Var value, | |
159 [in] PP_CompletionCallback callback); | |
160 | |
137 }; | 161 }; |
OLD | NEW |