Protocol handler interface.
More...
#include <protocolHandler.hpp>
|
enum | Operation { READ =cmdbind::CommandHandler::READ,
WRITE =cmdbind::CommandHandler::WRITE,
CLOSE =cmdbind::CommandHandler::CLOSE
} |
| Operation type. More...
|
|
Protocol handler interface.
Operation type.
Enumerator |
---|
READ |
|
WRITE |
<request to read data
|
CLOSE |
<request to write data
|
_Wolframe::cmdbind::ProtocolHandler::ProtocolHandler |
( |
| ) |
|
|
inline |
virtual _Wolframe::cmdbind::ProtocolHandler::~ProtocolHandler |
( |
| ) |
|
|
inlinevirtual |
Get the reference to the processor provider.
- Returns
- the reference to the processor provider
virtual void _Wolframe::cmdbind::ProtocolHandler::getDataLeft |
( |
const void *& |
begin, |
|
|
std::size_t & |
nofBytes |
|
) |
| |
|
pure virtual |
Get the data left unprocessed after close. The data belongs to the caller to process.
- Parameters
-
[out] | begin | returned start of the data chunk |
[out] | nofBytes | size of the returned data chunk in bytes |
virtual void _Wolframe::cmdbind::ProtocolHandler::getInputBlock |
( |
void *& |
begin, |
|
|
std::size_t & |
maxBlockSize |
|
) |
| |
|
pure virtual |
Get the input block request (READ operation)
- Parameters
-
virtual void _Wolframe::cmdbind::ProtocolHandler::getOutput |
( |
const void *& |
begin, |
|
|
std::size_t & |
bytesToTransfer |
|
) |
| |
|
pure virtual |
Get the next output chunk from the command handler (WRITE operation)
- Parameters
-
[out] | begin | start of the output chunk |
[out] | bytesToTransfer | size of the output chunk to send in bytes |
virtual const char* _Wolframe::cmdbind::ProtocolHandler::interruptDataSessionMarker |
( |
| ) |
const |
|
inlinevirtual |
Get the termination marker to send for an abort of a running data session.
const char* _Wolframe::cmdbind::ProtocolHandler::lastError |
( |
| ) |
const |
|
inline |
Get the last error message of command execution to be returned to the client.
virtual Operation _Wolframe::cmdbind::ProtocolHandler::nextOperation |
( |
| ) |
|
|
pure virtual |
Get the next operation to do for the connection handler.
- Returns
- the next operation for the connection handler
virtual void _Wolframe::cmdbind::ProtocolHandler::putEOF |
( |
| ) |
|
|
inlinevirtual |
Tell the protocol handler that EOF has been reached, if implemented.
virtual void _Wolframe::cmdbind::ProtocolHandler::putInput |
( |
const void * |
begin, |
|
|
std::size_t |
bytesTransferred |
|
) |
| |
|
pure virtual |
Passes the network input to the command handler (READ operation)
- Parameters
-
[in] | begin | start of the network input block. |
[in] | bytesTransferred | number of bytes passed in the input block |
virtual void _Wolframe::cmdbind::ProtocolHandler::setArgumentString |
( |
const std::string & |
| ) |
|
|
inlinevirtual |
Pass arguments to protocol handler.
Pass the reference to the execution context to the command handler.
- Parameters
-
[in] | c | the reference to the execution context owned by the caller (connection) |
virtual void _Wolframe::cmdbind::ProtocolHandler::setInputBuffer |
( |
void * |
buf, |
|
|
std::size_t |
allocsize |
|
) |
| |
|
pure virtual |
Define the input buffer for processing the command.
- Parameters
-
[in] | buf | buffer for the data to process |
[in] | allocsize | allocation size of the buffer for the data to process in bytes |
void _Wolframe::cmdbind::ProtocolHandler::setLastError |
( |
const std::string & |
msg | ) |
|
|
inline |
Set the last error message of command execution to be returned to the client.
virtual void _Wolframe::cmdbind::ProtocolHandler::setLocalEndPoint |
( |
const net::LocalEndpointR & |
| ) |
|
|
inlinevirtual |
Set the local connection end point.
- Parameters
-
[in] | local | the local point to set |
virtual void _Wolframe::cmdbind::ProtocolHandler::setOutputBuffer |
( |
void * |
buf, |
|
|
std::size_t |
size, |
|
|
std::size_t |
pos |
|
) |
| |
|
pure virtual |
Define the input buffer for processing the command.
- Parameters
-
[in] | buf | buffer for the data to process |
[in] | size | size of the buffer for the data to process in bytes |
[in] | pos | cursor position in the buffer defining byte position of the start of the the data to process |
Set the client connection end point.
- Parameters
-
[in] | remote | the end point to set |
std::string _Wolframe::cmdbind::ProtocolHandler::m_lastError |
|
private |
The documentation for this class was generated from the following file: