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

Side by Side Diff: ppapi/api/private/ppb_udp_socket_private.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 (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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_Private</code> interface. 7 * This file defines the <code>PPB_UDPSocket_Private</code> interface.
8 */ 8 */
9 9
10 label Chrome { 10 label Chrome {
11 M17 = 0.2, 11 M17 = 0.2,
12 M19 = 0.3, 12 M19 = 0.3,
13 M23 = 0.4 13 M23 = 0.4
14 }; 14 };
15 15
16 [assert_size(4)] 16 [assert_size(4)]
17 enum PP_UDPSocketFeature_Private { 17 enum PP_UDPSocketFeature_Private {
18 // Allow the socket to share the local address to which socket will 18 // Allow the socket to share the local address to which socket will
19 // be bound with other processes. Value's type should be 19 // be bound with other processes. Value's type should be
20 // PP_VARTYPE_BOOL. 20 // PP_VARTYPE_BOOL.
21 PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0, 21 PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0,
22 22
23 // Allow sending and receiving packets sent to and from broadcast 23 // Allow sending and receiving packets sent to and from broadcast
24 // addresses. Value's type should be PP_VARTYPE_BOOL. 24 // addresses. Value's type should be PP_VARTYPE_BOOL.
25 PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1, 25 PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1,
26 26
27 // Whether multicast packets sent from the host to the multicast group should
28 // be looped back to the host or not. Value's type should be PP_VARTYPE_BOOL.
29 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_LOOP = 2,
30
31 // Set time-to-live for multicast packets, from 0 to 255. Value's type should
32 // be PP_VARTYPE_INT32.
33 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_TTL = 3,
34
35 // Set network interface from which the multicast packets will be sent and
36 // received. Value's type should be PP_VARTYPE_INT32.
37 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_IF = 4,
38
39 // Join a multicast group and start receiving packets. Value's type should be
40 // PP_VARTYPE_RESOURCE.
41 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_JOIN = 5,
42
43 // Leave a multicast group previously joined. Value's type should be
44 // PP_VARTYPE_RESOURCE.
45 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_LEAVE = 6,
46
27 // Special value for counting the number of available 47 // Special value for counting the number of available
28 // features. Should not be passed to SetSocketFeature(). 48 // features. Should not be passed to SetSocketFeature().
29 PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 2 49 PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 7
30 }; 50 };
31 51
32 interface PPB_UDPSocket_Private { 52 interface PPB_UDPSocket_Private {
33 /** 53 /**
34 * Creates a UDP socket resource. 54 * Creates a UDP socket resource.
35 */ 55 */
36 PP_Resource Create([in] PP_Instance instance_id); 56 PP_Resource Create([in] PP_Instance instance_id);
37 57
38 /** 58 /**
39 * Determines if a given resource is a UDP socket. 59 * Determines if a given resource is a UDP socket.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 */ 109 */
90 int32_t SendTo([in] PP_Resource udp_socket, 110 int32_t SendTo([in] PP_Resource udp_socket,
91 [in] str_t buffer, 111 [in] str_t buffer,
92 [in] int32_t num_bytes, 112 [in] int32_t num_bytes,
93 [in] PP_NetAddress_Private addr, 113 [in] PP_NetAddress_Private addr,
94 [in] PP_CompletionCallback callback); 114 [in] PP_CompletionCallback callback);
95 115
96 /* Cancels all pending reads and writes, and closes the socket. */ 116 /* Cancels all pending reads and writes, and closes the socket. */
97 void Close([in] PP_Resource udp_socket); 117 void Close([in] PP_Resource udp_socket);
98 }; 118 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698