]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/serversocket.cpp
Add a dynamic receiver class for more flexible packet handling
[libs/net.git] / source / net / serversocket.cpp
index 60284837b1b91b5a95f6e98f9bcc9c6f3c4b40c0..66876c534fcbf73e2317527b95eb03554a034174 100644 (file)
@@ -1,4 +1,5 @@
 #include "serversocket.h"
+#include <msp/core/except.h>
 
 using namespace std;
 
@@ -9,14 +10,14 @@ ServerSocket::ServerSocket(Family af, int type, int proto):
        Socket(af, type, proto)
 { }
 
-unsigned ServerSocket::do_write(const char *, unsigned)
+size_t ServerSocket::do_write(const char *, size_t)
 {
-       throw logic_error("can't write to ServerSocket");
+       throw unsupported("ServerSocket::write");
 }
 
-unsigned ServerSocket::do_read(char *, unsigned)
+size_t ServerSocket::do_read(char *, size_t)
 {
-       throw logic_error("can't read from ServerSocket");
+       throw unsupported("ServerSocket::read");
 }
 
 } // namespace Net