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

Side by Side Diff: ppapi/c/ppb_udp_socket.h

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, 1 month 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 /* From ppb_udp_socket.idl modified Sat Jun 22 10:56:26 2013. */ 6 /* From ppb_udp_socket.idl modified Thu Oct 30 15:23:59 2014. */
7 7
8 #ifndef PPAPI_C_PPB_UDP_SOCKET_H_ 8 #ifndef PPAPI_C_PPB_UDP_SOCKET_H_
9 #define PPAPI_C_PPB_UDP_SOCKET_H_ 9 #define PPAPI_C_PPB_UDP_SOCKET_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
(...skipping 12 matching lines...) Expand all
29 * @addtogroup Enums 29 * @addtogroup Enums
30 * @{ 30 * @{
31 */ 31 */
32 /** 32 /**
33 * Option names used by <code>SetOption()</code>. 33 * Option names used by <code>SetOption()</code>.
34 */ 34 */
35 typedef enum { 35 typedef enum {
36 /** 36 /**
37 * Allows the socket to share the local address to which it will be bound with 37 * Allows the socket to share the local address to which it will be bound with
38 * other processes. Value's type should be <code>PP_VARTYPE_BOOL</code>. 38 * other processes. Value's type should be <code>PP_VARTYPE_BOOL</code>.
39 * This option can only be set before calling <code>Bind()</code>.
40 */ 39 */
41 PP_UDPSOCKET_OPTION_ADDRESS_REUSE = 0, 40 PP_UDPSOCKET_OPTION_ADDRESS_REUSE = 0,
42 /** 41 /**
43 * Allows sending and receiving packets to and from broadcast addresses. 42 * Allows sending and receiving packets to and from broadcast addresses.
44 * Value's type should be <code>PP_VARTYPE_BOOL</code>. 43 * Value's type should be <code>PP_VARTYPE_BOOL</code>.
45 * This option can only be set before calling <code>Bind()</code>.
46 */ 44 */
47 PP_UDPSOCKET_OPTION_BROADCAST = 1, 45 PP_UDPSOCKET_OPTION_BROADCAST = 1,
48 /** 46 /**
49 * Specifies the total per-socket buffer space reserved for sends. Value's 47 * Specifies the total per-socket buffer space reserved for sends. Value's
50 * type should be <code>PP_VARTYPE_INT32</code>. 48 * type should be <code>PP_VARTYPE_INT32</code>.
51 * This option can only be set after a successful <code>Bind()</code> call.
52 * 49 *
53 * 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
54 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't 51 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't
55 * guarantee it will conform to the size. 52 * guarantee it will conform to the size.
56 */ 53 */
57 PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE = 2, 54 PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE = 2,
58 /** 55 /**
59 * Specifies the total per-socket buffer space reserved for receives. Value's 56 * Specifies the total per-socket buffer space reserved for receives. Value's
60 * type should be <code>PP_VARTYPE_INT32</code>. 57 * type should be <code>PP_VARTYPE_INT32</code>.
61 * This option can only be set after a successful <code>Bind()</code> call.
62 * 58 *
63 * Note: This is only treated as a hint for the browser to set the buffer 59 * Note: This is only treated as a hint for the browser to set the buffer
64 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't 60 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't
65 * guarantee it will conform to the size. 61 * guarantee it will conform to the size.
66 */ 62 */
67 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3 63 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3
68 } PP_UDPSocket_Option; 64 } PP_UDPSocket_Option;
69 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocket_Option, 4); 65 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocket_Option, 4);
70 /** 66 /**
71 * @} 67 * @}
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 struct PP_CompletionCallback callback); 204 struct PP_CompletionCallback callback);
209 }; 205 };
210 206
211 typedef struct PPB_UDPSocket_1_0 PPB_UDPSocket; 207 typedef struct PPB_UDPSocket_1_0 PPB_UDPSocket;
212 /** 208 /**
213 * @} 209 * @}
214 */ 210 */
215 211
216 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ 212 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */
217 213
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698