Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: ppapi/api/ppb_tcp_socket.idl

Issue 690903002: Remove timing limitation of SetOption invocation for PPAPI sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 M41 = 1.2
13 }; 14 };
14 15
15 /** 16 /**
16 * Option names used by <code>SetOption()</code>. 17 * Option names used by <code>SetOption()</code>.
17 */ 18 */
18 [assert_size(4)] 19 [assert_size(4)]
19 enum PP_TCPSocket_Option { 20 enum PP_TCPSocket_Option {
20 /** 21 /**
21 * Disables coalescing of small writes to make TCP segments, and instead 22 * Disables coalescing of small writes to make TCP segments, and instead
22 * delivers data immediately. Value's type is <code>PP_VARTYPE_BOOL</code>. 23 * 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 * On version 1.1 or earlier, this option can only be set after a successful
25 * <code>Connect()</code> call. On version 1.2 or later, there is no such
26 * limitation.
24 */ 27 */
25 PP_TCPSOCKET_OPTION_NO_DELAY = 0, 28 PP_TCPSOCKET_OPTION_NO_DELAY = 0,
26 29
27 /** 30 /**
28 * Specifies the total per-socket buffer space reserved for sends. Value's 31 * Specifies the total per-socket buffer space reserved for sends. Value's
29 * type should be <code>PP_VARTYPE_INT32</code>. 32 * type should be <code>PP_VARTYPE_INT32</code>.
30 * This option can only be set after a successful <code>Connect()</code> call. 33 * On version 1.1 or earlier, this option can only be set after a successful
34 * <code>Connect()</code> call. On version 1.2 or later, there is no such
35 * limitation.
31 * 36 *
32 * Note: This is only treated as a hint for the browser to set the buffer 37 * 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 38 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't
34 * guarantee it will conform to the size. 39 * guarantee it will conform to the size.
35 */ 40 */
36 PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE = 1, 41 PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE = 1,
37 42
38 /** 43 /**
39 * Specifies the total per-socket buffer space reserved for receives. Value's 44 * Specifies the total per-socket buffer space reserved for receives. Value's
40 * type should be <code>PP_VARTYPE_INT32</code>. 45 * type should be <code>PP_VARTYPE_INT32</code>.
41 * This option can only be set after a successful <code>Connect()</code> call. 46 * On version 1.1 or earlier, this option can only be set after a successful
47 * <code>Connect()</code> call. On version 1.2 or later, there is no such
48 * limitation.
42 * 49 *
43 * Note: This is only treated as a hint for the browser to set the buffer 50 * 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 51 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't
45 * guarantee it will conform to the size. 52 * guarantee it will conform to the size.
46 */ 53 */
47 PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2 54 PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2
48 }; 55 };
49 56
50 /** 57 /**
51 * The <code>PPB_TCPSocket</code> interface provides TCP socket operations. 58 * The <code>PPB_TCPSocket</code> interface provides TCP socket operations.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 * @param[in] value The option value to set. 261 * @param[in] value The option value to set.
255 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon 262 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
256 * completion. 263 * completion.
257 * 264 *
258 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 265 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
259 */ 266 */
260 int32_t SetOption([in] PP_Resource tcp_socket, 267 int32_t SetOption([in] PP_Resource tcp_socket,
261 [in] PP_TCPSocket_Option name, 268 [in] PP_TCPSocket_Option name,
262 [in] PP_Var value, 269 [in] PP_Var value,
263 [in] PP_CompletionCallback callback); 270 [in] PP_CompletionCallback callback);
271
272 /**
273 * Sets a socket option on the TCP socket.
274 * Please see the <code>PP_TCPSocket_Option</code> description for option
275 * names, value types and allowed values.
276 *
277 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
278 * socket.
279 * @param[in] name The option to set.
280 * @param[in] value The option value to set.
281 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
282 * completion.
283 *
284 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
285 */
286 [version=1.2]
287 int32_t SetOption([in] PP_Resource tcp_socket,
288 [in] PP_TCPSocket_Option name,
289 [in] PP_Var value,
290 [in] PP_CompletionCallback callback);
264 }; 291 };
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc ('k') | ppapi/api/ppb_udp_socket.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698