]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/datagramsocket.h
Prepare for assimilating msphttp
[libs/net.git] / source / net / datagramsocket.h
diff --git a/source/net/datagramsocket.h b/source/net/datagramsocket.h
new file mode 100644 (file)
index 0000000..23ca296
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef MSP_NET_DATAGRAMSOCKET_H_
+#define MSP_NET_DATAGRAMSOCKET_H_
+
+#include "clientsocket.h"
+
+namespace Msp {
+namespace Net {
+
+class DatagramSocket: public ClientSocket
+{
+public:
+       DatagramSocket(Family, int = 0);
+
+       virtual bool connect(const SockAddr &);
+       virtual bool poll_connect(const Time::TimeDelta &) { return false; }
+
+       unsigned sendto(const char *, unsigned, const SockAddr &);
+       unsigned recvfrom(char *, unsigned, SockAddr *&);
+};
+
+} // namespace Net
+} // namespace Msp
+
+#endif