Broadcast datagram socket. More...
#include <netcomm/socket/datagram.h>

Public Member Functions | |
| BroadcastDatagramSocket (const char *broadcast_addr_s, unsigned short port, float timeout=0.f) | |
| Constructor. | |
| BroadcastDatagramSocket (BroadcastDatagramSocket &s) | |
| Copy constructor. | |
| virtual | ~BroadcastDatagramSocket () |
| Destructor. | |
| virtual Socket * | clone () |
| Clone socket. | |
| virtual void | bind () |
| Bind socket. | |
| virtual void | send (void *buf, unsigned int buf_len) |
| Send data. | |
Broadcast datagram socket.
An broadcast UDP socket on top of IP.
Definition at line 32 of file datagram_broadcast.h.
| fawkes::BroadcastDatagramSocket::BroadcastDatagramSocket | ( | const char * | broadcast_addr_s, | |
| unsigned short | port, | |||
| float | timeout = 0.f | |||
| ) |
Constructor.
| broadcast_addr_s | textual representation of the broadcast IP address to use for broadcast communication. NOT a hostname! | |
| port | port | |
| timeout | timeout, if 0 all operationsare blocking, otherwise it is tried for timeout seconds. |
Definition at line 51 of file datagram_broadcast.cpp.
Referenced by clone().
| fawkes::BroadcastDatagramSocket::BroadcastDatagramSocket | ( | BroadcastDatagramSocket & | datagram_socket | ) |
Copy constructor.
| datagram_socket | socket to copy. |
Definition at line 83 of file datagram_broadcast.cpp.
| fawkes::BroadcastDatagramSocket::~BroadcastDatagramSocket | ( | ) | [virtual] |
Destructor.
Definition at line 74 of file datagram_broadcast.cpp.
| void fawkes::BroadcastDatagramSocket::bind | ( | ) | [virtual] |
Bind socket.
This will make the socket listen for incoming traffic.
Definition at line 95 of file datagram_broadcast.cpp.
References fawkes::Socket::sock_fd.
Referenced by fawkes::WorldInfoTransceiver::WorldInfoTransceiver().
| Socket * fawkes::BroadcastDatagramSocket::clone | ( | ) | [virtual] |
Clone socket.
Implements fawkes::Socket.
Definition at line 122 of file datagram_broadcast.cpp.
References BroadcastDatagramSocket().
| void fawkes::BroadcastDatagramSocket::send | ( | void * | buf, | |
| unsigned int | buf_len | |||
| ) | [virtual] |
Send data.
This will send the given data to the broadcast address specified in the constructor.
| buf | buffer to write | |
| buf_len | length of buffer, number of bytes to write to stream |
Definition at line 135 of file datagram_broadcast.cpp.
References fawkes::Exception::append().
1.7.1