OLD | NEW |
| (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 /* This is an opaque type holding a network address. */ | |
7 struct PP_Flash_NetAddress { | |
8 uint32_t size; | |
9 [fixed=128] uint8_t data; | |
10 }; | |
11 | |
12 interface PPB_Flash_NetConnector_0_1 { | |
13 PP_Resource Create( | |
14 [in] PP_Instance instance_id); | |
15 PP_Bool IsFlashNetConnector( | |
16 [in] PP_Resource resource_id); | |
17 | |
18 /* Connect to a TCP port given as a host-port pair. The local and remote | |
19 * addresses of the connection (if successful) are returned in | |
20 * |local_addr_out| and |remote_addr_out|, respectively, if non-null. | |
21 */ | |
22 int32_t ConnectTcp( | |
23 [in] PP_Resource connector_id, | |
24 [in] str_t host, | |
25 [in] uint16_t port, | |
26 [out] PP_FileHandle socket_out, | |
27 [out] PP_Flash_NetAddress local_addr_out, | |
28 [out] PP_Flash_NetAddress remote_addr_out, | |
29 [in] PP_CompletionCallback callback); | |
30 | |
31 /* Same as |ConnectTcp()|, but connecting to the address given by |addr|. A | |
32 * typical use-case would be for reconnections. | |
33 */ | |
34 int32_t ConnectTcpAddress( | |
35 [in] PP_Resource connector_id, | |
36 [in] PP_Flash_NetAddress addr, | |
37 [out] PP_FileHandle socket_out, | |
38 [out] PP_Flash_NetAddress local_addr_out, | |
39 [out] PP_Flash_NetAddress remote_addr_out, | |
40 [in] PP_CompletionCallback callback); | |
41 }; | |
OLD | NEW |