Class UdpReceiverSocketImpl

Class Documentation

class UdpReceiverSocketImpl

Public Functions

inline UdpReceiverSocketImpl()

Default constructor

inline ~UdpReceiverSocketImpl()

Destructor, closes the socket

inline bool Init(const std::string &udp_sender, int udp_port)

Opens a udp socket

inline size_t Receive(std::vector<uint8_t> &msg_payload)

Reads blocking until some data has been received successfully or an error occurs. Returns the number of bytes received.

inline size_t Receive(std::vector<uint8_t> &msg_payload, double timeout, const std::vector<uint8_t> &udp_msg_start_seq)

Reads blocking until all bytes of a msgpack incl. header and crc have been received or an error occurs. Returns the number of bytes received.

inline int port(void) const

Return the udp port

Protected Attributes

std::string m_udp_sender
int m_udp_port
SOCKET m_udp_socket