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

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

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added Destroy message for initialized but cancelled sockets. Created 8 years, 10 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
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPB_TCPServerSocket_Private</code> interface.
8 */
9
10 label Chrome {
11 M18 = 0.1
12 };
13
14 /**
15 * The <code>PPB_TCPServerSocket_Private</code> interface provides TCP
16 * server socket operations.
17 */
18 interface PPB_TCPServerSocket_Private {
19 /**
20 * Allocates a TCP server socket resource. Also, starts lazy
yzshen1 2012/02/10 22:40:15 I think you could remove the 2nd and 3rd sentence.
ygorshenin1 2012/02/13 14:59:46 Done.
21 * initialization of created socket. Initialization will complete
22 * only after Listen call.
23 */
24 PP_Resource Create([in] PP_Instance instance);
25
26 /**
27 * Determines if a given resource is TCP server socket.
28 */
29 PP_Bool IsTCPServerSocket([in] PP_Resource resource);
30
31 /**
32 * Binds |tcp_server_socket| to the address given by |addr| and
33 * starts listening. The |backlog| argument defines the maximum
34 * length to which the queue of pending connections may
35 * grow. |callback| is invoked when |tcp_server_socket| is ready to
36 * accept incoming connections or in the case of failure.
brettw 2012/02/10 21:43:32 Can you add the description of the failures modes
ygorshenin1 2012/02/13 14:59:46 Done.
37 */
38 int32_t Listen([in] PP_Resource tcp_server_socket,
39 [in] PP_NetAddress_Private addr,
40 [in] int32_t backlog,
41 [in] PP_CompletionCallback callback);
42
43 /**
44 * Accepts single connection, creates instance of
45 * PPB_TCPSocket_Private and stores reference to it in
46 * |tcp_socket|. |callback| is invoked when connection is accepted
47 * or in the case of failure. This method can be called only after
48 * succesfull Listen call on |tcp_server_socket|.
49 */
50 int32_t Accept([in] PP_Resource tcp_server_socket,
51 [out] PP_Resource tcp_socket,
52 [in] PP_CompletionCallback callback);
53
54 /**
55 * Cancels all pending callbacks reporting PP_ERROR_ABORTED and
56 * closes the socket. Note: this method is implicitly called when
57 * server socket is destroyed.
58 */
59 void StopListening([in] PP_Resource tcp_server_socket);
60 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698