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

Unified Diff: ppapi/api/ppb_udp_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/api/ppb_tcp_socket.idl ('k') | ppapi/c/ppb_tcp_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/ppb_udp_socket.idl
diff --git a/ppapi/api/ppb_udp_socket.idl b/ppapi/api/ppb_udp_socket.idl
index e4c87b2a1cd5599a71c2e7727bd5d4d370177310..8226c00dd5c579b246dd0fb46c28dd5c1a85353d 100644
--- a/ppapi/api/ppb_udp_socket.idl
+++ b/ppapi/api/ppb_udp_socket.idl
@@ -7,10 +7,9 @@
* This file defines the <code>PPB_UDPSocket</code> interface.
*/
-[generate_thunk]
-
label Chrome {
- M29 = 1.0
+ M29 = 1.0,
+ M41 = 1.1
};
/**
@@ -28,14 +27,17 @@ enum PP_UDPSocket_Option {
/**
* Allows sending and receiving packets to and from broadcast addresses.
* Value's type should be <code>PP_VARTYPE_BOOL</code>.
- * This option can only be set before calling <code>Bind()</code>.
+ * On version 1.0, this option can only be set before calling
+ * <code>Bind()</code>. On version 1.1 or later, there is no such limitation.
*/
PP_UDPSOCKET_OPTION_BROADCAST = 1,
/**
* Specifies the total per-socket buffer space reserved for sends. Value's
* type should be <code>PP_VARTYPE_INT32</code>.
- * This option can only be set after a successful <code>Bind()</code> call.
+ * On version 1.0, this option can only be set after a successful
+ * <code>Bind()</code> call. On version 1.1 or later, there is no such
+ * limitation.
*
* Note: This is only treated as a hint for the browser to set the buffer
* size. Even if <code>SetOption()</code> succeeds, the browser doesn't
@@ -46,7 +48,9 @@ enum PP_UDPSocket_Option {
/**
* Specifies the total per-socket buffer space reserved for receives. Value's
* type should be <code>PP_VARTYPE_INT32</code>.
- * This option can only be set after a successful <code>Bind()</code> call.
+ * On version 1.0, this option can only be set after a successful
+ * <code>Bind()</code> call. On version 1.1 or later, there is no such
+ * limitation.
*
* Note: This is only treated as a hint for the browser to set the buffer
* size. Even if <code>SetOption()</code> succeeds, the browser doesn't
@@ -193,4 +197,24 @@ interface PPB_UDPSocket {
[in] PP_UDPSocket_Option name,
[in] PP_Var value,
[in] PP_CompletionCallback callback);
+
+ /**
+ * Sets a socket option on the UDP socket.
+ * Please see the <code>PP_UDPSocket_Option</code> description for option
+ * names, value types and allowed values.
+ *
+ * @param[in] udp_socket A <code>PP_Resource</code> corresponding to a UDP
+ * socket.
+ * @param[in] name The option to set.
+ * @param[in] value The option value to set.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ [version=1.1]
+ int32_t SetOption([in] PP_Resource udp_socket,
+ [in] PP_UDPSocket_Option name,
+ [in] PP_Var value,
+ [in] PP_CompletionCallback callback);
};
« no previous file with comments | « ppapi/api/ppb_tcp_socket.idl ('k') | ppapi/c/ppb_tcp_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698