OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_STREAM_H_ |
6 #define NET_SPDY_SPDY_STREAM_H_ | 6 #define NET_SPDY_SPDY_STREAM_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "net/spdy/spdy_header_block.h" | 24 #include "net/spdy/spdy_header_block.h" |
25 #include "net/spdy/spdy_protocol.h" | 25 #include "net/spdy/spdy_protocol.h" |
26 #include "net/ssl/ssl_client_cert_type.h" | 26 #include "net/ssl/ssl_client_cert_type.h" |
27 #include "url/gurl.h" | 27 #include "url/gurl.h" |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 | 30 |
31 class AddressList; | 31 class AddressList; |
32 class IPEndPoint; | 32 class IPEndPoint; |
33 struct LoadTimingInfo; | 33 struct LoadTimingInfo; |
34 class SSLCertRequestInfo; | |
35 class SSLInfo; | 34 class SSLInfo; |
36 class SpdySession; | 35 class SpdySession; |
37 | 36 |
38 enum SpdyStreamType { | 37 enum SpdyStreamType { |
39 // The most general type of stream; there are no restrictions on | 38 // The most general type of stream; there are no restrictions on |
40 // when data can be sent and received. | 39 // when data can be sent and received. |
41 SPDY_BIDIRECTIONAL_STREAM, | 40 SPDY_BIDIRECTIONAL_STREAM, |
42 // A stream where the client sends a request with possibly a body, | 41 // A stream where the client sends a request with possibly a body, |
43 // and the server then sends a response with a body. | 42 // and the server then sends a response with a body. |
44 SPDY_REQUEST_RESPONSE_STREAM, | 43 SPDY_REQUEST_RESPONSE_STREAM, |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // MORE_DATA_TO_SEND for bidirectional streams; for request/response | 370 // MORE_DATA_TO_SEND for bidirectional streams; for request/response |
372 // streams, it must be MORE_DATA_TO_SEND if there is more data to | 371 // streams, it must be MORE_DATA_TO_SEND if there is more data to |
373 // upload, or NO_MORE_DATA_TO_SEND if not. | 372 // upload, or NO_MORE_DATA_TO_SEND if not. |
374 void SendData(IOBuffer* data, int length, SpdySendStatus send_status); | 373 void SendData(IOBuffer* data, int length, SpdySendStatus send_status); |
375 | 374 |
376 // Fills SSL info in |ssl_info| and returns true when SSL is in use. | 375 // Fills SSL info in |ssl_info| and returns true when SSL is in use. |
377 bool GetSSLInfo(SSLInfo* ssl_info, | 376 bool GetSSLInfo(SSLInfo* ssl_info, |
378 bool* was_npn_negotiated, | 377 bool* was_npn_negotiated, |
379 NextProto* protocol_negotiated); | 378 NextProto* protocol_negotiated); |
380 | 379 |
381 // Fills SSL Certificate Request info |cert_request_info| and returns | |
382 // true when SSL is in use. | |
383 bool GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); | |
384 | |
385 // If the stream is stalled on sending data, but the session is not | 380 // If the stream is stalled on sending data, but the session is not |
386 // stalled on sending data and |send_window_size_| is positive, then | 381 // stalled on sending data and |send_window_size_| is positive, then |
387 // set |send_stalled_by_flow_control_| to false and unstall the data | 382 // set |send_stalled_by_flow_control_| to false and unstall the data |
388 // sending. Called by the session or by the stream itself. Must be | 383 // sending. Called by the session or by the stream itself. Must be |
389 // called only when the stream is still open. | 384 // called only when the stream is still open. |
390 void PossiblyResumeIfSendStalled(); | 385 void PossiblyResumeIfSendStalled(); |
391 | 386 |
392 // Returns whether or not this stream is closed. Note that the only | 387 // Returns whether or not this stream is closed. Note that the only |
393 // time a stream is closed and not deleted is in its delegate's | 388 // time a stream is closed and not deleted is in its delegate's |
394 // OnClose() method. | 389 // OnClose() method. |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 bool write_handler_guard_; | 573 bool write_handler_guard_; |
579 | 574 |
580 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 575 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
581 | 576 |
582 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 577 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
583 }; | 578 }; |
584 | 579 |
585 } // namespace net | 580 } // namespace net |
586 | 581 |
587 #endif // NET_SPDY_SPDY_STREAM_H_ | 582 #endif // NET_SPDY_SPDY_STREAM_H_ |
OLD | NEW |