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

Unified Diff: ppapi/api/private/ppb_udp_socket_private.idl

Issue 10735056: AllowBroadcast() is exposed to NaCl. (Closed) Base URL: http://git.chromium.org/chromium/src.git@udp_broadcast
Patch Set: Sync. Created 8 years, 4 months 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 | « content/renderer/pepper/pepper_plugin_delegate_impl.cc ('k') | ppapi/c/private/ppb_udp_socket_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/private/ppb_udp_socket_private.idl
diff --git a/ppapi/api/private/ppb_udp_socket_private.idl b/ppapi/api/private/ppb_udp_socket_private.idl
index 083c33d1991a31f8b41ffd978b3b2d2425f238cc..fc4fe1c9c62eaa397df77618a45929b759fa67e2 100644
--- a/ppapi/api/private/ppb_udp_socket_private.idl
+++ b/ppapi/api/private/ppb_udp_socket_private.idl
@@ -9,7 +9,24 @@
label Chrome {
M17 = 0.2,
- M19 = 0.3
+ M19 = 0.3,
+ M23 = 0.4
+};
+
+[assert_size(4)]
+enum PP_UDPSocketFeature_Private {
+ // Allow the socket to share the local address to which socket will
+ // be bound with other processes. Value's type should be
+ // PP_VARTYPE_BOOL.
+ PP_UDPSOCKETFEATURE_ADDRESS_REUSE = 0,
+
+ // Allow sending and receiving packets sent to and from broadcast
+ // addresses. Value's type should be PP_VARTYPE_BOOL.
+ PP_UDPSOCKETFEATURE_BROADCAST = 1,
+
+ // Special value for counting the number of available
+ // features. Should not be passed to SetSocketFeature().
+ PP_UDPSOCKETFEATURE_COUNT = 2
};
interface PPB_UDPSocket_Private {
@@ -23,6 +40,20 @@ interface PPB_UDPSocket_Private {
*/
PP_Bool IsUDPSocket([in] PP_Resource resource_id);
+ /**
+ * Sets a socket feature to |udp_socket|. Should be called before
+ * Bind(). Possible values for |name|, |value| and |value|'s type
+ * are described in PP_UDPSocketFeature_Private description. If no
+ * error occurs, returns PP_OK. Otherwise, returns
+ * PP_ERROR_BADRESOURCE (if bad |udp_socket| provided),
+ * PP_ERROR_BADARGUMENT (if bad name/value/value's type provided)
+ * or PP_ERROR_FAILED in the case of internal errors.
+ */
+ [version=0.4]
+ int32_t SetSocketFeature([in] PP_Resource udp_socket,
+ [in] PP_UDPSocketFeature_Private name,
+ [in] PP_Var value);
+
/* Creates a socket and binds to the address given by |addr|. */
int32_t Bind([in] PP_Resource udp_socket,
[in] PP_NetAddress_Private addr,
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.cc ('k') | ppapi/c/private/ppb_udp_socket_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698