|
Sponge
CS144's user-space TCP library
|
Go to the documentation of this file. 1 #ifndef SPONGE_LIBSPONGE_TCP_RECEIVER_HH
2 #define SPONGE_LIBSPONGE_TCP_RECEIVER_HH
38 std::optional<WrappingInt32>
ackno()
const;
66 #endif // SPONGE_LIBSPONGE_TCP_RECEIVER_HH
size_t unassembled_bytes() const
number of bytes stored but not yet reassembled
std::optional< WrappingInt32 > ackno() const
The ackno that should be sent to the peer.
The "receiver" part of a TCP implementation.
void segment_received(const TCPSegment &seg)
handle an inbound segment
const ByteStream & stream_out() const
StreamReassembler _reassembler
Our data structure for re-assembling bytes.
A class that assembles a series of excerpts from a byte stream (possibly out of order,...
size_t unassembled_bytes() const
const ByteStream & stream_out() const
TCPReceiver(const size_t capacity)
Construct a TCP receiver.
size_t window_size() const
The window size that should be sent to the peer.
ByteStream & stream_out()
size_t _capacity
The maximum number of bytes we'll store.