Class UdpReceiverSocketImpl
Defined in File udp_sockets.h
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, bool blocking = false)
-
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
-
inline bool &running(void)
Return true, if socket is ready to receive, or false otherwise. Set false to signal stop receiving
-
inline UdpReceiverSocketImpl()