| Index: net/quic/quic_packet_creator.h
|
| diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
|
| index 31646ec7bdf8cba269ef6be80e813981aa8db22e..c89a382476122cfd78661a333eeb321102912482 100644
|
| --- a/net/quic/quic_packet_creator.h
|
| +++ b/net/quic/quic_packet_creator.h
|
| @@ -74,22 +74,22 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
| QuicStreamOffset offset,
|
| InFecGroup is_in_fec_group);
|
|
|
| + // Converts a raw payload to a stream frame (which fits into the currently
|
| + // open packet) and adds the frame to the packet. The payload begins at
|
| + // |iov_offset| into the |iov|.
|
| + // Creates |frame| and returns true if succeeds, false otherwise.
|
| + bool ConsumeData(QuicStreamId id,
|
| + QuicIOVector iov,
|
| + size_t iov_offset,
|
| + QuicStreamOffset offset,
|
| + bool fin,
|
| + bool needs_padding,
|
| + QuicFrame* frame);
|
| +
|
| + // Returns true if currently open packet can accommodate more stream frames of
|
| + // stream |id| at |offset|, false otherwise.
|
| bool HasRoomForStreamFrame(QuicStreamId id, QuicStreamOffset offset) const;
|
|
|
| - // Converts a raw payload to a frame which fits into the currently open
|
| - // packet. The payload begins at |iov_offset| into the |iov|.
|
| - // Returns the number of bytes consumed from data.
|
| - // If data is empty and fin is true, the expected behavior is to consume the
|
| - // fin but return 0. If any data is consumed, it will be copied into a
|
| - // new buffer that |frame| will point to and will be stored in |buffer|.
|
| - size_t CreateStreamFrame(QuicStreamId id,
|
| - QuicIOVector iov,
|
| - size_t iov_offset,
|
| - QuicStreamOffset offset,
|
| - bool fin,
|
| - QuicFrame* frame,
|
| - UniqueStreamBuffer* buffer);
|
| -
|
| // Serializes all frames into a single packet. All frames must fit into a
|
| // single packet. Also, sets the entropy hash of the serialized packet to a
|
| // random bool and returns that value as a member of SerializedPacket.
|
| @@ -235,6 +235,20 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
|
|
|
| static bool ShouldRetransmit(const QuicFrame& frame);
|
|
|
| + // Converts a raw payload to a frame which fits into the currently open
|
| + // packet. The payload begins at |iov_offset| into the |iov|.
|
| + // Returns the number of bytes consumed from data.
|
| + // If data is empty and fin is true, the expected behavior is to consume the
|
| + // fin but return 0. If any data is consumed, it will be copied into a
|
| + // new buffer that |frame| will point to and will be stored in |buffer|.
|
| + size_t CreateStreamFrame(QuicStreamId id,
|
| + QuicIOVector iov,
|
| + size_t iov_offset,
|
| + QuicStreamOffset offset,
|
| + bool fin,
|
| + QuicFrame* frame,
|
| + UniqueStreamBuffer* buffer);
|
| +
|
| // Copies |length| bytes from iov starting at offset |iov_offset| into buffer.
|
| // |iov| must be at least iov_offset+length total length and buffer must be
|
| // at least |length| long.
|
|
|