Class Buffer

Inheritance Relationships

Base Type

Class Documentation

class Buffer : public netio3::NetworkBuffer

A buffer for TCP communication.

The buffer is derived from NetworkBuffer and adds functionality to store a key mapped to the buffer. It only provides a constructor to allocate the buffer itself.

Public Functions

inline Buffer(const std::size_t size, const Key key)

Constructs a Buffer object.

The key is returned to the user on the on_send_complete callback.

Parameters:
  • size – The size of the buffer

  • key – The key of the buffer

inline Key getKey() const

Retrieves the key of the buffer.

Returns:

The key of the buffer