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..c5a4322332613fd04ea3dffb603445edd894f42e 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,16 @@ 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 before calling |
bbudge
2014/12/09 18:37:38
Option can be set only *after* Bind().
And below.
hidehiko
2014/12/09 19:51:42
Oops, good catch. I wrongly updated the comment. R
|
+ * <code>Bind()</code>. 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 +47,8 @@ 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 before calling |
+ * <code>Bind()</code>. 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 +195,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); |
}; |