OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 5 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <list> | 10 #include <list> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "net/spdy/spdy_protocol.h" | 23 #include "net/spdy/spdy_protocol.h" |
24 #include "net/spdy/spdy_session.h" | 24 #include "net/spdy/spdy_session.h" |
25 #include "net/spdy/spdy_stream.h" | 25 #include "net/spdy/spdy_stream.h" |
26 | 26 |
27 | 27 |
28 class GURL; | 28 class GURL; |
29 | 29 |
30 namespace net { | 30 namespace net { |
31 | 31 |
32 class AddressList; | 32 class AddressList; |
33 class ClientSocketHandle; | |
34 class HttpStream; | 33 class HttpStream; |
35 class IOBuffer; | 34 class IOBuffer; |
36 class SpdySession; | |
37 class SpdyStream; | 35 class SpdyStream; |
38 | 36 |
39 class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket, | 37 class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket, |
40 public SpdyStream::Delegate { | 38 public SpdyStream::Delegate { |
41 public: | 39 public: |
42 // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM | 40 // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM |
43 // CONNECT frame for |endpoint|. After the SYN_REPLY is received, | 41 // CONNECT frame for |endpoint|. After the SYN_REPLY is received, |
44 // any data read/written to the socket will be transferred in data | 42 // any data read/written to the socket will be transferred in data |
45 // frames. | 43 // frames. |
46 SpdyProxyClientSocket(SpdyStream* spdy_stream, | 44 SpdyProxyClientSocket(SpdyStream* spdy_stream, |
(...skipping 28 matching lines...) Expand all Loading... |
75 virtual const BoundNetLog& NetLog() const; | 73 virtual const BoundNetLog& NetLog() const; |
76 virtual void SetSubresourceSpeculation(); | 74 virtual void SetSubresourceSpeculation(); |
77 virtual void SetOmniboxSpeculation(); | 75 virtual void SetOmniboxSpeculation(); |
78 virtual bool WasEverUsed() const; | 76 virtual bool WasEverUsed() const; |
79 virtual bool UsingTCPFastOpen() const; | 77 virtual bool UsingTCPFastOpen() const; |
80 virtual int64 NumBytesRead() const; | 78 virtual int64 NumBytesRead() const; |
81 virtual base::TimeDelta GetConnectTimeMicros() const; | 79 virtual base::TimeDelta GetConnectTimeMicros() const; |
82 | 80 |
83 // Socket methods: | 81 // Socket methods: |
84 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); | 82 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); |
85 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback)
; | 83 virtual int Write(IOBuffer* buf, |
| 84 int buf_len, |
| 85 OldCompletionCallback* callback); |
86 virtual bool SetReceiveBufferSize(int32 size); | 86 virtual bool SetReceiveBufferSize(int32 size); |
87 virtual bool SetSendBufferSize(int32 size); | 87 virtual bool SetSendBufferSize(int32 size); |
88 virtual int GetPeerAddress(AddressList* address) const; | 88 virtual int GetPeerAddress(AddressList* address) const; |
89 virtual int GetLocalAddress(IPEndPoint* address) const; | 89 virtual int GetLocalAddress(IPEndPoint* address) const; |
90 | 90 |
91 // SpdyStream::Delegate methods: | 91 // SpdyStream::Delegate methods: |
92 virtual bool OnSendHeadersComplete(int status); | 92 virtual bool OnSendHeadersComplete(int status); |
93 virtual int OnSendBody(); | 93 virtual int OnSendBody(); |
94 virtual int OnSendBodyComplete(int status, bool* eof); | 94 virtual int OnSendBodyComplete(int status, bool* eof); |
95 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 95 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 scoped_ptr<SpdyHttpStream> response_stream_; | 165 scoped_ptr<SpdyHttpStream> response_stream_; |
166 | 166 |
167 const BoundNetLog net_log_; | 167 const BoundNetLog net_log_; |
168 | 168 |
169 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); | 169 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); |
170 }; | 170 }; |
171 | 171 |
172 } // namespace net | 172 } // namespace net |
173 | 173 |
174 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 174 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
OLD | NEW |