The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CFlowControlListProcessor Class Reference

Inheritance diagram for CFlowControlListProcessor:
Collaboration diagram for CFlowControlListProcessor:

List of all members.

Detailed Description

A connection filter that will manage the flow of data on a connection so as to prevent uncontrolled resource usage if there is more data to send than the connection can manage. The filter monitors the rate at which writes that are issues on the connection are completing. If the rate is slower than the rate at which new writes are being issued on the connection then the filter begins to buffer the data in a list and will send it when the connection has capacity. If the list exceeds a predefined maximum amount of buffered data then the filter will either begin to discard data either in a FIFO or LIFO order or it will call a callback method that you supply and give you the list to deal with.

Public Types

enum  ActionOnListFull { RemoveEarliest, RemoveLatest, TerminateConnection }

Public Member Functions

 CFlowControlListProcessor (ActionOnListFull action)
 CFlowControlListProcessor (const CFlowControlListProcessor &rhs)
CFlowControlListProcessoroperator= (const CFlowControlListProcessor &rhs)
bool OnListFull (IStreamSocket &socket, IMonitorStreamSocketFlowControl::ConnectionId id, IMonitorStreamSocketFlowControl &monitor, const JetByteTools::IO::IBuffer &buffer, JetByteTools::IO::IBufferChain &buffers, JetByteTools::IO::IBufferChain &discardedBuffers) override
void OnListStatus (IStreamSocket &, const DWORD) override
void OnListEmpty (IStreamSocket &) override
virtual DWORD OnPreListFull ()

Member Enumeration Documentation


Constructor & Destructor Documentation

CFlowControlListProcessor ( ActionOnListFull  action  )  [explicit]

Member Function Documentation

CFlowControlListProcessor& operator= ( const CFlowControlListProcessor rhs  ) 

bool OnListFull ( IStreamSocket socket,
IMonitorStreamSocketFlowControl::ConnectionId  id,
IMonitorStreamSocketFlowControl monitor,
const JetByteTools::IO::IBuffer &  buffer,
JetByteTools::IO::IBufferChain buffers,
JetByteTools::IO::IBufferChain discardedBuffers 
) [override, virtual]

void OnListStatus ( IStreamSocket ,
const   DWORD 
) [inline, override, virtual]

void OnListEmpty ( IStreamSocket  )  [inline, override, virtual]

virtual DWORD OnPreListFull (  )  [inline, virtual, inherited]

Generated on Sun Sep 12 19:10:11 2021 for The Server Framework - v7.4 by doxygen 1.5.3