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

Unified Diff: ppapi/c/ppb_udp_socket.h

Issue 704133005: Pepper: Add support for multicast in PPB_UDPSocket API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, version new enum values 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/c/pp_macros.h ('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/c/ppb_udp_socket.h
diff --git a/ppapi/c/ppb_udp_socket.h b/ppapi/c/ppb_udp_socket.h
index aa3fa744143fa29ffb996aafe43eada622d71427..6ec36268b150e058d26b78aa3d5549cbb6fd9dcc 100644
--- a/ppapi/c/ppb_udp_socket.h
+++ b/ppapi/c/ppb_udp_socket.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_udp_socket.idl modified Wed Dec 10 04:11:03 2014. */
+/* From ppb_udp_socket.idl modified Mon Dec 15 17:47:37 2014. */
#ifndef PPAPI_C_PPB_UDP_SOCKET_H_
#define PPAPI_C_PPB_UDP_SOCKET_H_
@@ -70,7 +70,53 @@ typedef enum {
* size. Even if <code>SetOption()</code> succeeds, the browser doesn't
* guarantee it will conform to the size.
*/
- PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3
+ PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3,
+ /**
+ * Specifies whether the packets sent from the host to the multicast group
+ * should be looped back to the host or not. Value's type should be
+ * <code>PP_VARTYPE_BOOL</code>.
+ * This option can only be set before calling <code>Bind()</code>.
+ *
+ * This is only supported in version 1.1 of the API (Chrome 41) and later.
+ */
+ PP_UDPSOCKET_OPTION_MULTICAST_LOOP = 4,
+ /**
+ * Specifies the time-to-live for packets sent to the multicast group. The
+ * value should be within 0 to 255 range. The default value is 1 and means
+ * that packets will not be routed beyond the local network. Value's type
+ * should be <code>PP_VARTYPE_INT32</code>.
+ * This option can only be set before calling <code>Bind()</code>.
+ *
+ * This is only supported in version 1.1 of the API (Chrome 41) and later.
+ */
+ PP_UDPSOCKET_OPTION_MULTICAST_TTL = 5,
+ /**
+ * Specifies the network interface from which the multicast packets will be
+ * sent and received, as specified by <code>PPB_NetworkList</code>. Value's
+ * type should be <code>PP_VARTYPE_INT32</code>.
+ * This option can only be set before calling <code>Bind()</code>.
+ *
+ * This is only supported in version 1.1 of the API (Chrome 41) and later.
+ */
+ PP_UDPSOCKET_OPTION_MULTICAST_IF = 6,
+ /**
+ * Joins the multicast group with given address as specifed by
+ * <code>PPB_NetAddress</code> API. Value's type should be
+ * <code>PP_VARTYPE_RESOURCE</code>.
+ * This option can only be set after a successful <code>Bind()</code> call.
+ *
+ * This is only supported in version 1.1 of the API (Chrome 41) and later.
+ */
+ PP_UDPSOCKET_OPTION_MULTICAST_JOIN = 7,
+ /**
+ * Leaves the multicast group with given address as specifed by
+ * <code>PPB_NetAddress</code> API. Value's type should be
+ * <code>PP_VARTYPE_RESOURCE</code>.
+ * This option can only be set after a successful <code>Bind()</code> call.
+ *
+ * This is only supported in version 1.1 of the API (Chrome 41) and later.
+ */
+ PP_UDPSOCKET_OPTION_MULTICAST_LEAVE = 8
} PP_UDPSocket_Option;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocket_Option, 4);
/**
@@ -235,7 +281,7 @@ struct PPB_UDPSocket_1_0 {
struct PP_CompletionCallback callback);
void (*Close)(PP_Resource udp_socket);
int32_t (*SetOption)(PP_Resource udp_socket,
- PP_UDPSocket_Option name,
+ PP_UDPSocket_Option_1_0 name,
etrunko 2014/12/17 17:39:36 Here is what we get from the generator when the en
struct PP_Var value,
struct PP_CompletionCallback callback);
};
« no previous file with comments | « ppapi/c/pp_macros.h ('k') | ppapi/c/private/ppb_udp_socket_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698