virtual void OnClose();
// Called when we get a stream reset from the peer.
- virtual void OnStreamReset(QuicRstStreamErrorCode error);
+ virtual void OnStreamReset(const QuicRstStreamFrame& frame);
// Called when we get or send a connection close, and should immediately
// close the stream. This is not passed through the sequencer,
QuicVersion version();
+ void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; }
+ void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; }
+
protected:
// Sends as much of 'data' to the connection as the connection will consume,
// and then buffers any remaining data in queued_data_.
bool fin_buffered_;
bool fin_sent_;
+ // In combination with fin_sent_, used to ensure that a FIN and/or a RST is
+ // always sent before stream termination.
+ bool rst_sent_;
+
// True if the session this stream is running under is a server session.
bool is_server_;