Class UdpSenderSocketImpl

Class Documentation

class UdpSenderSocketImpl

class UdpSenderSocketImpl implements the udp socket for sending udp packages

Public Functions

inline UdpSenderSocketImpl(const std::string &server_address = "192.168.0.1", int udp_port = 2115)

Constructor, opens an udp socket.

Parameters:
  • server_address[in] ip address

  • udp_port[in] udp port

inline ~UdpSenderSocketImpl()

Destructor, closes the socket

inline bool IsOpen(void) const

Returns true if the udp socket is opened and ready to send, or false otherwise.

inline bool Send(std::vector<uint8_t> &message)

Sends a binary message.

Protected Attributes

bool m_socket_opened
std::string m_server_address
int m_udp_port
SOCKET m_udp_socket