]> git.tdb.fi Git - libs/net.git/blobdiff - source/socket.h
Update handle types
[libs/net.git] / source / socket.h
index a2cbae1a285ded03a645b377b3e2a85188213664..5536146544c3de098993d1af06295caeecd075be 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef MSP_NET_SOCKET_H_
 #define MSP_NET_SOCKET_H_
 
-#include <msp/io/base.h>
+#include <msp/io/eventobject.h>
+#include <msp/io/handle.h>
 #include "constants.h"
 #include "sockaddr.h"
 #include "types.h"
 namespace Msp {
 namespace Net {
 
-class Socket: public IO::Base
+class Socket: public IO::EventObject
 {
 protected:
        SocketHandle handle;
-#ifdef WIN32
        IO::Handle event;
-#endif
        bool connected;
        SockAddr *local_addr;
        SockAddr *peer_addr;
@@ -26,7 +25,7 @@ public:
        ~Socket();
 
        void set_block(bool);
-       IO::Handle get_event_handle();
+       const IO::Handle &get_event_handle();
 
        bool is_connected() const { return connected; }