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

Side by Side Diff: ppapi/c/private/ppb_udp_socket_private.h

Issue 9212047: Add GetBoundAddress to PPB_UDPSocket_Private (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add GetBoundAddress to retrieve address we bound to. 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 | Annotate | Revision Log
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 /* From private/ppb_udp_socket_private.idl modified Wed Nov 16 15:27:20 2011. */ 6 /* From private/ppb_udp_socket_private.idl modified Thu Feb 2 11:17:26 2012. */
7 7
8 #ifndef PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ 8 #ifndef PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ 9 #define PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
(...skipping 18 matching lines...) Expand all
35 */ 35 */
36 PP_Resource (*Create)(PP_Instance instance_id); 36 PP_Resource (*Create)(PP_Instance instance_id);
37 /** 37 /**
38 * Determines if a given resource is a UDP socket. 38 * Determines if a given resource is a UDP socket.
39 */ 39 */
40 PP_Bool (*IsUDPSocket)(PP_Resource resource_id); 40 PP_Bool (*IsUDPSocket)(PP_Resource resource_id);
41 /* Creates a socket and binds to the address given by |addr|. */ 41 /* Creates a socket and binds to the address given by |addr|. */
42 int32_t (*Bind)(PP_Resource udp_socket, 42 int32_t (*Bind)(PP_Resource udp_socket,
43 const struct PP_NetAddress_Private* addr, 43 const struct PP_NetAddress_Private* addr,
44 struct PP_CompletionCallback callback); 44 struct PP_CompletionCallback callback);
45 /* Upon successful completion of Bind, the address that we have
46 * bound to is stored in |addr|
47 */
48 PP_Bool (*GetBoundAddress)(PP_Resource udp_socket,
49 struct PP_NetAddress_Private* addr);
45 /* Performs a non-blocking recvfrom call on socket. 50 /* Performs a non-blocking recvfrom call on socket.
46 * Bind must be called first. |callback| is invoked when recvfrom 51 * Bind must be called first. |callback| is invoked when recvfrom
47 * reads data. You must call GetRecvFromAddress to recover the 52 * reads data. You must call GetRecvFromAddress to recover the
48 * address the data was retrieved from. 53 * address the data was retrieved from.
49 */ 54 */
50 int32_t (*RecvFrom)(PP_Resource udp_socket, 55 int32_t (*RecvFrom)(PP_Resource udp_socket,
51 char* buffer, 56 char* buffer,
52 int32_t num_bytes, 57 int32_t num_bytes,
53 struct PP_CompletionCallback callback); 58 struct PP_CompletionCallback callback);
54 /* Upon successful completion of RecvFrom, the address that the data 59 /* Upon successful completion of RecvFrom, the address that the data
(...skipping 14 matching lines...) Expand all
69 void (*Close)(PP_Resource udp_socket); 74 void (*Close)(PP_Resource udp_socket);
70 }; 75 };
71 76
72 typedef struct PPB_UDPSocket_Private_0_2 PPB_UDPSocket_Private; 77 typedef struct PPB_UDPSocket_Private_0_2 PPB_UDPSocket_Private;
73 /** 78 /**
74 * @} 79 * @}
75 */ 80 */
76 81
77 #endif /* PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ */ 82 #endif /* PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ */
78 83
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698