HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
tt::packet Class Reference

#include <ttauri/net/packet.hpp>

Public Member Functions

 packet (ssize_t nrBytes) noexcept
 Allocate an empty packet of a certain size.
 
 packet (packet const &rhs) noexcept=delete
 
packet operator= (packet const &rhs) noexcept=delete
 
 packet (packet &&rhs) noexcept
 
std::byte * begin () noexcept
 
std::byte * end () noexcept
 
ssize_t readSize () const noexcept
 How many bytes can be read from this buffer.
 
ssize_t writeSize () const noexcept
 How many bytes can still be written to this buffer.
 
bool pushed () const noexcept
 Should this packet be pushed onto the network.
 
void push () noexcept
 Mark this packet to be pushed to the network.
 
void write (ssize_t nrBytes) noexcept
 Commit a write.
 
void read (ssize_t nrBytes) noexcept
 Consume a read.
 

Detailed Description

A network message or stream buffer.

Constructor & Destructor Documentation

◆ packet()

tt::packet::packet ( ssize_t nrBytes)
inlinenoexcept

Allocate an empty packet of a certain size.

Member Function Documentation

◆ push()

void tt::packet::push ( )
inlinenoexcept

Mark this packet to be pushed to the network.

◆ pushed()

bool tt::packet::pushed ( ) const
inlinenoexcept

Should this packet be pushed onto the network.

◆ read()

void tt::packet::read ( ssize_t nrBytes)
inlinenoexcept

Consume a read.

Should be called after data has been copied from this buffer.

◆ readSize()

ssize_t tt::packet::readSize ( ) const
inlinenoexcept

How many bytes can be read from this buffer.

◆ write()

void tt::packet::write ( ssize_t nrBytes)
inlinenoexcept

Commit a write.

Should be called after data has been copied into this buffer.

◆ writeSize()

ssize_t tt::packet::writeSize ( ) const
inlinenoexcept

How many bytes can still be written to this buffer.


The documentation for this class was generated from the following file: