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 // The entity that handles framing writes for a Quic client or server. | 5 // The entity that handles framing writes for a Quic client or server. |
6 // Each QuicSession will have a connection associated with it. | 6 // Each QuicSession will have a connection associated with it. |
7 // | 7 // |
8 // On the server side, the Dispatcher handles the raw reads, and hands off | 8 // On the server side, the Dispatcher handles the raw reads, and hands off |
9 // packets via ProcessUdpPacket for framing and processing. | 9 // packets via ProcessUdpPacket for framing and processing. |
10 // | 10 // |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // if the socket was unexpectedly blocked. | 224 // if the socket was unexpectedly blocked. |
225 // If |delegate| is provided, then it will be informed once ACKs have been | 225 // If |delegate| is provided, then it will be informed once ACKs have been |
226 // received for all the packets written in this call. | 226 // received for all the packets written in this call. |
227 // The |delegate| is not owned by the QuicConnection and must outlive it. | 227 // The |delegate| is not owned by the QuicConnection and must outlive it. |
228 QuicConsumedData SendStreamData(QuicStreamId id, | 228 QuicConsumedData SendStreamData(QuicStreamId id, |
229 const IOVector& data, | 229 const IOVector& data, |
230 QuicStreamOffset offset, | 230 QuicStreamOffset offset, |
231 bool fin, | 231 bool fin, |
232 QuicAckNotifier::DelegateInterface* delegate); | 232 QuicAckNotifier::DelegateInterface* delegate); |
233 | 233 |
234 // Send a stream reset frame to the peer. | 234 // Send a RST_STREAM frame to the peer. |
235 virtual void SendRstStream(QuicStreamId id, | 235 virtual void SendRstStream(QuicStreamId id, |
236 QuicRstStreamErrorCode error, | 236 QuicRstStreamErrorCode error, |
237 QuicStreamOffset bytes_written); | 237 QuicStreamOffset bytes_written); |
238 | 238 |
| 239 // Send a BLOCKED frame to the peer. |
| 240 virtual void SendBlocked(QuicStreamId id); |
| 241 |
| 242 // Send a WINDOW_UPDATE frame to the peer. |
| 243 virtual void SendWindowUpdate(QuicStreamId id, |
| 244 QuicStreamOffset byte_offset); |
| 245 |
239 // Sends the connection close packet without affecting the state of the | 246 // Sends the connection close packet without affecting the state of the |
240 // connection. This should only be called if the session is actively being | 247 // connection. This should only be called if the session is actively being |
241 // destroyed: otherwise call SendConnectionCloseWithDetails instead. | 248 // destroyed: otherwise call SendConnectionCloseWithDetails instead. |
242 virtual void SendConnectionClosePacket(QuicErrorCode error, | 249 virtual void SendConnectionClosePacket(QuicErrorCode error, |
243 const std::string& details); | 250 const std::string& details); |
244 | 251 |
245 // Sends a connection close frame to the peer, and closes the connection by | 252 // Sends a connection close frame to the peer, and closes the connection by |
246 // calling CloseConnection(notifying the visitor as it does so). | 253 // calling CloseConnection(notifying the visitor as it does so). |
247 virtual void SendConnectionClose(QuicErrorCode error); | 254 virtual void SendConnectionClose(QuicErrorCode error); |
248 virtual void SendConnectionCloseWithDetails(QuicErrorCode error, | 255 virtual void SendConnectionCloseWithDetails(QuicErrorCode error, |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 // If non-empty this contains the set of versions received in a | 724 // If non-empty this contains the set of versions received in a |
718 // version negotiation packet. | 725 // version negotiation packet. |
719 QuicVersionVector server_supported_versions_; | 726 QuicVersionVector server_supported_versions_; |
720 | 727 |
721 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 728 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
722 }; | 729 }; |
723 | 730 |
724 } // namespace net | 731 } // namespace net |
725 | 732 |
726 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 733 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |