Chromium Code Reviews| Index: net/socket/stream_socket.h |
| =================================================================== |
| --- net/socket/stream_socket.h (revision 86260) |
| +++ net/socket/stream_socket.h (working copy) |
| @@ -16,6 +16,8 @@ |
| class NET_TEST StreamSocket : public Socket { |
| public: |
| + StreamSocket() : num_bytes_read_(0) {} |
| + |
| virtual ~StreamSocket() {} |
| // Called to establish a connection. Returns OK if the connection could be |
| @@ -79,6 +81,12 @@ |
| // TCP FastOpen is an experiment with sending data in the TCP SYN packet. |
| virtual bool UsingTCPFastOpen() const = 0; |
| + // Returns the number of bytes successfully written to this socket. |
|
willchan no longer on Chromium
2011/06/06 10:57:36
This should be virtual int NumBytesRead() const =
Gagan
2011/06/06 20:27:10
Done.
|
| + virtual int NumBytesRead() const { return num_bytes_read_; } |
| + |
| + // Returns the RTT of this socket. |
| + virtual double GetRTTMs() const { return rtt_ms_; } |
|
willchan no longer on Chromium
2011/06/06 10:57:36
virtual double GetRTTInMs() const = 0;
Gagan
2011/06/06 20:27:10
Done.
|
| + |
| 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 |
| @@ -126,6 +134,9 @@ |
| // logging level. |
| void LogByteTransfer(const BoundNetLog& net_log, NetLog::EventType event_type, |
| int byte_count, char* bytes) const; |
| + |
| + int num_bytes_read_; |
|
willchan no longer on Chromium
2011/06/06 10:57:36
Don't add any concrete member variables into this
Gagan
2011/06/06 20:27:10
Done.
|
| + double rtt_ms_; |
| }; |
| } // namespace net |