#include <ITransport.h>
Public Member Functions | |
virtual int | read (std::vector< std::uint8_t > &buffer, std::size_t nBytesToReceive)=0 |
virtual int | recv (std::vector< std::uint8_t > &buffer, std::size_t maxBytesToReceive)=0 |
virtual int | send (const std::vector< std::uint8_t > &buffer)=0 |
virtual | ~ITransport () |
Definition at line 31 of file ITransport.h.
|
inlinevirtual |
Definition at line 34 of file ITransport.h.
|
pure virtual |
Read a number of bytes
Contrary to recv this method reads precisely nBytesToReceive bytes.
[in] | buffer | buffer containing the bytes that shall be sent. |
[in] | maxBytesToReceive | maximum number of bytes to receive. |
Implemented in visionary::TcpSocket, and visionary::UdpSocket.
|
pure virtual |
Receive data on socket to device
Receive at most maxBytesToReceive bytes.
[in] | buffer | buffer containing the bytes that shall be sent. |
[in] | maxBytesToReceive | maximum number of bytes to receive. |
Implemented in visionary::TcpSocket, and visionary::UdpSocket.
|
pure virtual |
Send data on socket to device
All bytes are sent on the socket. It is regarded as error if this is not possible.
[in] | buffer | buffer containing the bytes that shall be sent. |
Implemented in visionary::TcpSocket, and visionary::UdpSocket.