28 #ifndef INCLUDE_OLA_NETWORK_SOCKET_H_
29 #define INCLUDE_OLA_NETWORK_SOCKET_H_
36 #include <ola/io/IOQueue.h>
59 virtual bool Init() = 0;
79 virtual bool Close() = 0;
94 virtual ssize_t
SendTo(
const uint8_t *buffer,
97 unsigned short port)
const = 0;
106 virtual ssize_t
SendTo(
const uint8_t *buffer,
125 unsigned short port)
const = 0;
147 virtual bool RecvFrom(uint8_t *buffer, ssize_t *data_read)
const = 0;
179 uint16_t &port)
const = 0;
189 virtual bool RecvFrom(uint8_t *buffer,
214 bool multicast_loop =
false) = 0;
230 virtual bool SetTos(uint8_t tos) = 0;
244 m_handle(ola::io::INVALID_DESCRIPTOR),
245 m_bound_to_port(
false) {}
255 ssize_t
SendTo(
const uint8_t *buffer,
258 unsigned short port)
const;
259 ssize_t
SendTo(
const uint8_t *buffer,
264 unsigned short port)
const;
268 bool RecvFrom(uint8_t *buffer, ssize_t *data_read)
const;
275 uint16_t &port)
const;
285 bool multicast_loop =
false);
292 ola::io::DescriptorHandle m_handle;
293 bool m_bound_to_port;
299 #endif // INCLUDE_OLA_NETWORK_SOCKET_H_