]> git.tdb.fi Git - libs/net.git/blob - source/net/datagramsocket.h
Implement an asynchronous name resolver class
[libs/net.git] / source / net / datagramsocket.h
1 #ifndef MSP_NET_DATAGRAMSOCKET_H_
2 #define MSP_NET_DATAGRAMSOCKET_H_
3
4 #include "clientsocket.h"
5
6 namespace Msp {
7 namespace Net {
8
9 class DatagramSocket: public ClientSocket
10 {
11 public:
12         DatagramSocket(Family, int = 0);
13
14         virtual bool connect(const SockAddr &);
15         virtual bool poll_connect(const Time::TimeDelta &) { return false; }
16
17         unsigned sendto(const char *, unsigned, const SockAddr &);
18         unsigned recvfrom(char *, unsigned, SockAddr *&);
19 };
20
21 } // namespace Net
22 } // namespace Msp
23
24 #endif