ztsdb
Public Member Functions | Public Attributes | List of all members
net::BufferMgt Struct Reference

Public Member Functions

 BufferMgt (size_t max_size_p, zcore::NetStats &stats_p)
 
void addBufferToReadylist (Global::conn_id_t id, Buf &&b)
 Add a buffer to the ready list.
 
bool get_data (Global::conn_id_t &id, Buf &buf)
 
size_t gc ()
 
void removeAllBuffersForId (Global::conn_id_t id)
 
size_t getReadyBufSz () const
 

Public Attributes

std::unordered_map< Global::conn_id_t, Bufbufmap
 

Member Function Documentation

◆ gc()

size_t net::BufferMgt::gc ( )

Garbage collect the buffer queue. Returns the number of bytes that were deleted. 'd' is the amount of time a buffer can live.

◆ removeAllBuffersForId()

void net::BufferMgt::removeAllBuffersForId ( Global::conn_id_t  id)

Remove all the buffers (both partial and completed) that belong to 'id'.

Member Data Documentation

◆ bufmap

std::unordered_map<Global::conn_id_t, Buf> net::BufferMgt::bufmap

A queue for partially completed buffers, i.e. buffers that are still being assembled.


The documentation for this struct was generated from the following files: