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

Side by Side Diff: ppapi/api/private/ppb_flash_udp_socket.idl

Issue 7745005: Initial work for UDP Pepper API (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: readd names that I mistakenly removed from AUTHORS file Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | ppapi/c/private/ppb_flash_udp_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPB_Flash_UDPSocket</code> interface.
8 */
9
10 label Chrome {
11 M16 = 0.1
12 };
13
14 interface PPB_Flash_UDPSocket {
15 /**
16 * Creates a UDP socket resource.
17 */
18 PP_Resource Create([in] PP_Instance instance_id);
19
20 /**
21 * Determines if a given resource is a UDP socket.
22 */
23 PP_Bool IsFlashUDPSocket([in] PP_Resource resource_id);
24
25 /* Creates a socket and binds to the address given by |addr|. */
26 int32_t Bind([in] PP_Resource udp_socket,
27 [in] PP_Flash_NetAddress addr,
28 [in] PP_CompletionCallback callback);
29
30 /* Performs a non-blocking recvfrom call on socket.
31 * Bind must be called first. |callback| is invoked when recvfrom
32 * reads data. You must call GetRecvFromAddress to recover the
33 * address the data was retrieved from.
34 */
35 int32_t RecvFrom([in] PP_Resource udp_socket,
36 [out] str_t buffer,
37 [in] int32_t num_bytes,
38 [in] PP_CompletionCallback callback);
39
40 /* Upon successful completion of RecvFrom, the address that the data
41 * was received from is stored in |addr|.
42 */
43 PP_Bool GetRecvFromAddress([in] PP_Resource udp_socket,
44 [out] PP_Flash_NetAddress addr);
45
46 /* Performs a non-blocking sendto call on the socket created and
47 * bound(has already called Bind). The callback |callback| is
48 * invoked when sendto completes.
49 */
50 int32_t SendTo([in] PP_Resource udp_socket,
51 [in] str_t buffer,
52 [in] int32_t num_bytes,
53 [in] PP_Flash_NetAddress addr,
54 [in] PP_CompletionCallback callback);
55
56 /* Cancels all pending reads and writes, and closes the socket. */
57 void Close([in] PP_Resource udp_socket);
58 };
59
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | ppapi/c/private/ppb_flash_udp_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698