Fawkes API
Fawkes Development Version
|
24 #ifndef _NETCOMM_SOCKET_DATAGRAM_BROADCAST_H_
25 #define _NETCOMM_SOCKET_DATAGRAM_BROADCAST_H_
27 #include <netcomm/socket/socket.h>
28 #include <netinet/in.h>
44 virtual void bind(
const unsigned short int port);
45 virtual void bind(
const unsigned short int port,
const char *hostname);
47 virtual void send(
void *buf,
size_t buf_len);
49 send(
void *buf,
size_t buf_len,
const struct sockaddr *to_addr, socklen_t addr_len)
55 struct ::sockaddr_in *broadcast_addr;
BroadcastDatagramSocket(const char *broadcast_addr_s, unsigned short port, float timeout=0.f)
Constructor.
virtual void send(void *buf, size_t buf_len, const struct sockaddr *to_addr, socklen_t addr_len)
Send message.
virtual Socket * clone()
Clone socket.
Broadcast datagram socket.
Fawkes library namespace.
float timeout
Timeout in seconds for various operations.
virtual void bind()
Bind socket.
BroadcastDatagramSocket & operator=(BroadcastDatagramSocket &s)
Assignment operator.
virtual ~BroadcastDatagramSocket()
Destructor.
virtual void send(void *buf, size_t buf_len)
Send data.