Index: net/socket/stream_socket.h |
diff --git a/net/socket/stream_socket.h b/net/socket/stream_socket.h |
index 4ed735af04fd3ce8da1d312960971482003e88d7..99184ed8a1bf5ed9776d26a9d0e74e2f69c7372a 100644 |
--- a/net/socket/stream_socket.h |
+++ b/net/socket/stream_socket.h |
@@ -111,6 +111,19 @@ class NET_EXPORT_PRIVATE StreamSocket : public Socket { |
// Disconnect() is called. |
virtual int64_t GetTotalReceivedBytes() const = 0; |
+ // Sets whether the socket should treat entering suspend mode as an error, and |
+ // return ERR_NETWORK_SUSPENDED if it happens. Defaults to false. |
+ // |
+ // This is useful because entering suspend mode tends to kill all sockets |
+ // connected to remote systems. See https://crbug.com/4606). |
Bence
2016/10/27 13:04:29
Unmatched ')'.
|
+ // |
+ // This is a hint only, subclasses are free to ignore this flag (And currently |
+ // do - it's only respected when set directly on a TcpClientSocket). |
+ // |
+ // TODO(mmenke): Should this be done on all TCP sockets? On all non-localhost |
+ // TCP sockets? |
+ virtual void SetFailOnSuspend(bool disconnect_on_suspend); |
+ |
protected: |
// The following class is only used to gather statistics about the history of |
// a socket. It is only instantiated and used in basic sockets, such as |