34 #ifndef ASYNC_UDP_SOCKET_INCLUDED
35 #define ASYNC_UDP_SOCKET_INCLUDED
44 #include <sigc++/sigc++.h>
149 bool initOk(
void)
const {
return (sock != -1); }
159 bool write(
const IpAddress& remote_ip,
int remote_port,
const void *buf,
167 int fd(
void)
const {
return sock; }
190 UdpPacket * send_buf;
193 void handleInput(
FdWatch *watch);
~UdpSocket(void)
Destructor.
bool write(const IpAddress &remote_ip, int remote_port, const void *buf, int count)
Write data to the remote host.
int fd(void) const
Get the file descriptor for the UDP socket.
bool initOk(void) const
Check if the initialization was ok.
A class for watching file descriptors.
sigc::signal< void, const IpAddress &, void *, int > dataReceived
A signal that is emitted when data has been received.
sigc::signal< void, bool > sendBufferFull
A signal that is emitted when the send buffer is full.
Namespace for the asynchronous programming classes.
A class for working with UDP sockets.
Platform independent representation of an IP address.
A class for representing an IP address in an OS independent way.
UdpSocket(uint16_t local_port=0, const IpAddress &bind_ip=IpAddress())
Constructor.