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

Side by Side 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: Fixed comments. 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 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
14 };
15
16 [assert_size(4)]
17 enum PP_UDPSocketFeature_Private {
18 // Allow the socket to share the local address to which socket will
19 // be bound with other processes. Value's type should be
20 // PP_VARTYPE_BOOL.
21 PP_UDPSOCKETFEATURE_ADDRESS_REUSE = 0,
22
23 // Allow sending and receiving packets sent to and from broadcast
24 // addresses. Value's type should be PP_VARTYPE_BOOL.
25 PP_UDPSOCKETFEATURE_BROADCAST = 1,
26
27 // Special value for counting the number of available
28 // features. Should not be passed to SetSocketFeature().
29 PP_UDPSOCKETFEATURE_COUNT = 2
13 }; 30 };
14 31
15 interface PPB_UDPSocket_Private { 32 interface PPB_UDPSocket_Private {
16 /** 33 /**
17 * Creates a UDP socket resource. 34 * Creates a UDP socket resource.
18 */ 35 */
19 PP_Resource Create([in] PP_Instance instance_id); 36 PP_Resource Create([in] PP_Instance instance_id);
20 37
21 /** 38 /**
22 * Determines if a given resource is a UDP socket. 39 * Determines if a given resource is a UDP socket.
23 */ 40 */
24 PP_Bool IsUDPSocket([in] PP_Resource resource_id); 41 PP_Bool IsUDPSocket([in] PP_Resource resource_id);
25 42
43 [version=0.4]
brettw 2012/08/20 04:34:45 Can you provide documentation for this? In particu
ygorshenin1 2012/08/20 12:08:01 Done. Yes, callback means that the setting has ef
brettw 2012/08/20 17:55:15 My weird that you can't set more than one at a tim
ygorshenin1 2012/08/21 12:00:27 OK, I'll delete callbacks. On 2012/08/20 17:55:15
44 int32_t SetSocketFeature([in] PP_Resource udp_socket,
45 [in] PP_UDPSocketFeature_Private name,
46 [in] PP_Var value,
47 [in] PP_CompletionCallback callback);
48
26 /* Creates a socket and binds to the address given by |addr|. */ 49 /* Creates a socket and binds to the address given by |addr|. */
27 int32_t Bind([in] PP_Resource udp_socket, 50 int32_t Bind([in] PP_Resource udp_socket,
28 [in] PP_NetAddress_Private addr, 51 [in] PP_NetAddress_Private addr,
29 [in] PP_CompletionCallback callback); 52 [in] PP_CompletionCallback callback);
30 53
31 /* Returns the address that the socket has bound to. A successful 54 /* Returns the address that the socket has bound to. A successful
32 * call to Bind must be called first. Returns PP_FALSE if Bind 55 * call to Bind must be called first. Returns PP_FALSE if Bind
33 * fails, or if Close has been called. 56 * fails, or if Close has been called.
34 */ 57 */
35 [version=0.3] 58 [version=0.3]
(...skipping 22 matching lines...) Expand all
58 */ 81 */
59 int32_t SendTo([in] PP_Resource udp_socket, 82 int32_t SendTo([in] PP_Resource udp_socket,
60 [in] str_t buffer, 83 [in] str_t buffer,
61 [in] int32_t num_bytes, 84 [in] int32_t num_bytes,
62 [in] PP_NetAddress_Private addr, 85 [in] PP_NetAddress_Private addr,
63 [in] PP_CompletionCallback callback); 86 [in] PP_CompletionCallback callback);
64 87
65 /* Cancels all pending reads and writes, and closes the socket. */ 88 /* Cancels all pending reads and writes, and closes the socket. */
66 void Close([in] PP_Resource udp_socket); 89 void Close([in] PP_Resource udp_socket);
67 }; 90 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698