VoiceMan
Public Member Functions
ClientDataHandler Class Reference

Processes raw lines of data from clients. More...

Inheritance diagram for ClientDataHandler:
AbstractClientDataHandler

List of all members.

Public Member Functions

 ClientDataHandler (VoicemanProtocol &protocol, size_t maxInputLine)
 The constructor.
void processClientData (Client &client, const std::string &data)
 Processes new part of data from the client.

Detailed Description

This class is the intermediate point between main loop and protocol parser. It is purposed to control incomplete lines and line length exceeding.

See also:
VoicemanProtocol

Constructor & Destructor Documentation

ClientDataHandler::ClientDataHandler ( VoicemanProtocol protocol,
size_t  maxInputLine 
) [inline]
Parameters:
[in]protocolThe reference to protocol handling object
[in]maxInputLineThe maximum length of input line (0 - not limited)

Member Function Documentation

void ClientDataHandler::processClientData ( Client client,
const std::string &  data 
) [inline, virtual]

This method receives new portion of data as single line of text, splits it to the proper line set, processes it with protocol object and controls incomplete line part.

Parameters:
[in]clientThe reference to client object to handle data for
[in]dataThe data to process

Implements AbstractClientDataHandler.