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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h

Issue 99813004: [NaCl SDK] nacl_io: implement set/getsockopt for TCP_NODELAY. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h b/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
index a9b6f42ae71d2ee5024f3edd4a0acac0a1d42652..6b45bc43907b91786cf2c4dfbe88a31ff39f2e05 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
@@ -39,10 +39,18 @@ class MountNodeTCP : public MountNodeSocket {
struct sockaddr* addr,
socklen_t* len);
virtual Error Bind(const struct sockaddr* addr, socklen_t len);
- virtual Error Listen(int backlog);
virtual Error Connect(const HandleAttr& attr,
const struct sockaddr* addr,
socklen_t len);
+ virtual Error GetSockOpt(int lvl,
+ int optname,
+ void* optval,
+ socklen_t* len);
+ virtual Error Listen(int backlog);
+ virtual Error SetSockOpt(int lvl,
+ int optname,
+ const void* optval,
+ socklen_t len);
virtual Error Shutdown(int how);
virtual void SetError_Locked(int pp_error_num);
@@ -50,6 +58,7 @@ class MountNodeTCP : public MountNodeSocket {
void ConnectFailed_Locked();
protected:
+ Error SetNoDelay_Locked();
virtual Error Recv_Locked(void* buf,
size_t len,
PP_Resource* out_addr,
@@ -62,6 +71,7 @@ class MountNodeTCP : public MountNodeSocket {
ScopedEventEmitterTCP emitter_;
PP_Resource accepted_socket_;
+ bool tcp_nodelay_;
};

Powered by Google App Engine
This is Rietveld 408576698