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

Side by Side Diff: ppapi/api/ppb_udp_socket.idl

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, initial unit tests Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* Copyright 2013 The Chromium Authors. All rights reserved. 1 /* Copyright 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** 6 /**
7 * This file defines the <code>PPB_UDPSocket</code> interface. 7 * This file defines the <code>PPB_UDPSocket</code> interface.
8 */ 8 */
9 9
10 [generate_thunk] 10 [generate_thunk]
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 /** 46 /**
47 * Specifies the total per-socket buffer space reserved for receives. Value's 47 * Specifies the total per-socket buffer space reserved for receives. Value's
48 * type should be <code>PP_VARTYPE_INT32</code>. 48 * type should be <code>PP_VARTYPE_INT32</code>.
49 * This option can only be set after a successful <code>Bind()</code> call. 49 * This option can only be set after a successful <code>Bind()</code> call.
50 * 50 *
51 * Note: This is only treated as a hint for the browser to set the buffer 51 * Note: This is only treated as a hint for the browser to set the buffer
52 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't 52 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't
53 * guarantee it will conform to the size. 53 * guarantee it will conform to the size.
54 */ 54 */
55 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3 55 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3,
56
57 /**
58 * Specifies whether the packets sent from the host to the multicast group
59 * should be looped back to the host or not. Value's type should be
60 * <code>PP_VARTYPE_BOOL</code>.
61 * This option can only be set before calling <code>Bind()</code>.
62 */
63 PP_UDPSOCKET_OPTION_MULTICAST_LOOP = 4,
64
65 /**
66 * Specifies the time-to-live for packets sent to the multicast group. The
67 * value should be within 0 to 255 range. The default value is 1 and means
68 * that packets will not be routed beyond the local network. Value's type
69 * should be <code>PP_VARTYPE_INT32</code>.
70 * This option can only be set before calling <code>Bind()</code>.
71 */
72 PP_UDPSOCKET_OPTION_MULTICAST_TTL = 5,
73
74 /**
75 * Specifies the network interface from which the multicast packets will be
76 * sent and received, as specified by <code>PPB_NetworkList</code>. Value's
77 * type should be <code>PP_VARTYPE_INT32</code>.
78 * This option can only be set before calling <code>Bind()</code>.
79 */
80 PP_UDPSOCKET_OPTION_MULTICAST_IF = 6,
81
82 /**
83 * Joins the multicast group with given address as specifed by
84 * <code>PPB_NetAddress</code> API. Value's type should be
85 * <code>PP_VARTYPE_RESOURCE</code>.
86 * This option can only be set after a successful <code>Bind()</code> call.
87 */
88 PP_UDPSOCKET_OPTION_MULTICAST_JOIN = 7,
89
90 /**
91 * Leaves the multicast group with given address as specifed by
92 * <code>PPB_NetAddress</code> API. Value's type should be
93 * <code>PP_VARTYPE_RESOURCE</code>.
94 * This option can only be set after a successful <code>Bind()</code> call.
95 */
96 PP_UDPSOCKET_OPTION_MULTICAST_LEAVE = 8
56 }; 97 };
57 98
58 /** 99 /**
59 * The <code>PPB_UDPSocket</code> interface provides UDP socket operations. 100 * The <code>PPB_UDPSocket</code> interface provides UDP socket operations.
60 * 101 *
61 * Permissions: Apps permission <code>socket</code> with subrule 102 * Permissions: Apps permission <code>socket</code> with subrule
62 * <code>udp-bind</code> is required for <code>Bind()</code>; subrule 103 * <code>udp-bind</code> is required for <code>Bind()</code>; subrule
63 * <code>udp-send-to</code> is required for <code>SendTo()</code>. 104 * <code>udp-send-to</code> is required for <code>SendTo()</code>.
64 * For more details about network communication permissions, please see: 105 * For more details about network communication permissions, please see:
65 * http://developer.chrome.com/apps/app_network.html 106 * http://developer.chrome.com/apps/app_network.html
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon 228 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
188 * completion. 229 * completion.
189 * 230 *
190 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 231 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
191 */ 232 */
192 int32_t SetOption([in] PP_Resource udp_socket, 233 int32_t SetOption([in] PP_Resource udp_socket,
193 [in] PP_UDPSocket_Option name, 234 [in] PP_UDPSocket_Option name,
194 [in] PP_Var value, 235 [in] PP_Var value,
195 [in] PP_CompletionCallback callback); 236 [in] PP_CompletionCallback callback);
196 }; 237 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698