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

Unified Diff: ppapi/thunk/ppb_tcp_socket_private_thunk.cc

Issue 12220050: Provide a way to disable Nagle's algorithm on Pepper TCP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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/thunk/ppb_tcp_socket_private_api.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_tcp_socket_private_thunk.cc
diff --git a/ppapi/thunk/ppb_tcp_socket_private_thunk.cc b/ppapi/thunk/ppb_tcp_socket_private_thunk.cc
index 425f5ad1d025728ce4b74720c3412ab55c07e029..928f07381c8f7d491b37ebbf8e808dfcae1651ef 100644
--- a/ppapi/thunk/ppb_tcp_socket_private_thunk.cc
+++ b/ppapi/thunk/ppb_tcp_socket_private_thunk.cc
@@ -121,6 +121,17 @@ void Disconnect(PP_Resource tcp_socket) {
enter.object()->Disconnect();
}
+int32_t SetOption(PP_Resource tcp_socket,
+ PP_TCPSocketOption_Private name,
+ PP_Var value,
+ PP_CompletionCallback callback) {
+ EnterTCP enter(tcp_socket, callback, true);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(
+ enter.object()->SetOption(name, value, enter.callback()));
+}
+
const PPB_TCPSocket_Private_0_3 g_ppb_tcp_socket_thunk_0_3 = {
&Create,
&IsTCPSocket,
@@ -134,7 +145,7 @@ const PPB_TCPSocket_Private_0_3 g_ppb_tcp_socket_thunk_0_3 = {
&Disconnect
};
-const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk_0_4 = {
+const PPB_TCPSocket_Private_0_4 g_ppb_tcp_socket_thunk_0_4 = {
&Create,
&IsTCPSocket,
&Connect,
@@ -149,6 +160,22 @@ const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk_0_4 = {
&Disconnect
};
+const PPB_TCPSocket_Private_0_5 g_ppb_tcp_socket_thunk_0_5 = {
+ &Create,
+ &IsTCPSocket,
+ &Connect,
+ &ConnectWithNetAddress,
+ &GetLocalAddress,
+ &GetRemoteAddress,
+ &SSLHandshake,
+ &GetServerCertificate,
+ &AddChainBuildingCertificate,
+ &Read,
+ &Write,
+ &Disconnect,
+ &SetOption
+};
+
} // namespace
const PPB_TCPSocket_Private_0_3* GetPPB_TCPSocket_Private_0_3_Thunk() {
@@ -159,5 +186,9 @@ const PPB_TCPSocket_Private_0_4* GetPPB_TCPSocket_Private_0_4_Thunk() {
return &g_ppb_tcp_socket_thunk_0_4;
}
+const PPB_TCPSocket_Private_0_5* GetPPB_TCPSocket_Private_0_5_Thunk() {
+ return &g_ppb_tcp_socket_thunk_0_5;
+}
+
} // namespace thunk
} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_tcp_socket_private_api.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698