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;
159 virtual bool RecvFrom(uint8_t *buffer,
174 virtual bool RecvFrom(uint8_t *buffer,
177 uint16_t &port)
const = 0;
187 virtual bool RecvFrom(uint8_t *buffer,
212 bool multicast_loop =
false) = 0;
228 virtual bool SetTos(uint8_t tos) = 0;
242 m_handle(ola::io::INVALID_DESCRIPTOR),
243 m_bound_to_port(
false) {}
253 ssize_t
SendTo(
const uint8_t *buffer,
256 unsigned short port)
const;
257 ssize_t
SendTo(
const uint8_t *buffer,
262 unsigned short port)
const;
266 bool RecvFrom(uint8_t *buffer, ssize_t *data_read)
const;
273 uint16_t &port)
const;
283 bool multicast_loop =
false);
290 ola::io::DescriptorHandle m_handle;
291 bool m_bound_to_port;
297 #endif // INCLUDE_OLA_NETWORK_SOCKET_H_