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); |
}; |