|
Sponge
CS144's user-space TCP library
|
size_t bytes_written() const
Total number of bytes written.
void pop_output(const size_t len)
Remove bytes from the buffer.
void end_input()
Signal that the byte stream has reached its ending.
size_t buffer_size() const
std::string read(const size_t len)
std::string peek_output(const size_t len) const
void DUMMY_CODE(Targs &&...)
size_t bytes_read() const
Total number of bytes popped.
ByteStream(const size_t capacity)
Construct a stream with room for capacity bytes.
size_t write(const std::string &data)
bool buffer_empty() const
size_t remaining_capacity() const