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; }
176 sigc::signal<void, const IpAddress&, uint16_t, void*, int>
dataReceived;
191 UdpPacket * send_buf;
194 void handleInput(
FdWatch *watch);
sigc::signal< void, const IpAddress &, uint16_t, void *, int > dataReceived
A signal that is emitted when data has been received.
~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.
A class for watching file descriptors.
bool initOk(void) const
Check if the initialization was ok.
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.