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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_udp_socket_private_rpc_server.cc

Issue 9212047: Add GetBoundAddress to PPB_UDPSocket_Private (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix build error after rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/private/udp_socket_private.cc ('k') | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_udp_socket_private_rpc_server.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_udp_socket_private_rpc_server.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_udp_socket_private_rpc_server.cc
index ccb46a2de394ed908b709e3faa9254842edd003b..11bd80c7f251f6f55d85ff6f8920934584f8444c 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_udp_socket_private_rpc_server.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_udp_socket_private_rpc_server.cc
@@ -87,6 +87,31 @@ void PpbUDPSocketPrivateRpcServer::PPB_UDPSocket_Private_Bind(
rpc->result = NACL_SRPC_RESULT_OK;
}
+void PpbUDPSocketPrivateRpcServer::PPB_UDPSocket_Private_GetBoundAddress(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ // input
+ PP_Resource udp_socket,
+ // output
+ nacl_abi_size_t* addr_bytes, char* addr,
+ int32_t* success) {
+ NaClSrpcClosureRunner runner(done);
+ rpc->result = NACL_SRPC_RESULT_APP_ERROR;
+
+ if (*addr_bytes !=
+ static_cast<nacl_abi_size_t>(sizeof(PP_NetAddress_Private)))
+ return;
+
+ PP_Bool pp_success =
+ PPBUDPSocketPrivateInterface()->GetBoundAddress(
+ udp_socket,
+ reinterpret_cast<PP_NetAddress_Private*>(addr));
+ *success = PP_ToBool(pp_success);
+ DebugPrintf("PPB_UDPSocket_Private::GetBoundAddress: "
+ "success=%"NACL_PRId32"\n", *success);
+ rpc->result = NACL_SRPC_RESULT_OK;
+}
+
void PpbUDPSocketPrivateRpcServer::PPB_UDPSocket_Private_RecvFrom(
NaClSrpcRpc* rpc,
NaClSrpcClosure* done,
« no previous file with comments | « ppapi/cpp/private/udp_socket_private.cc ('k') | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698