The Micro C++ Library
micxx::traits::Receiver Class Reference

The Receiver class defines a combination of a Connection and a recv(void*, size_t, bool) method. More...

#include <micxx/traits/Receiver.hxx>

Inherits micxx::traits::Connection.

Inherited by micxx::traits::BiDiConnection.

List of all members.

Public Member Functions

virtual int recv (void *bytes, std::size_t size, bool blocking=true)=0
 Try to receive up to size number of bytes.

Detailed Description

The Receiver class defines a combination of a Connection and a recv(void*, size_t, bool) method.

Author:
Norbert Klose
Date:
November, 2011

Member Function Documentation

virtual int micxx::traits::Receiver::recv ( void *  bytes,
std::size_t  size,
bool  blocking = true 
) [pure virtual]

Try to receive up to size number of bytes.

Parameters:
bytesThe pointer to the receiving buffer
sizeThe number of bytes to be expected to be received
blockingIf blocking is true, then the call waits until all size bytes were received. Otherwise, it returns as soon as possible.
Returns:
The number of bytes received and written to bytes. If the connection has been closed, the return value is 0.

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