]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/socket.h
Implement the required virtual functions in Socket
[libs/net.git] / source / net / socket.h
index c830930d6d54b6787357e73f92e48a17882d1168..fe5c605049f84ab8396e11f49d0ceda1a3fe032c 100644 (file)
@@ -20,6 +20,14 @@ public:
 class Socket: public IO::EventObject
 {
 protected:
+       enum SocketEvent
+       {
+               S_NONE = IO::P_NONE,
+               S_INPUT = IO::P_INPUT,
+               S_CONNECT = 4096,
+               S_ACCEPT = 8192
+       };
+
        struct Private;
 
        Private *priv;
@@ -27,10 +35,15 @@ protected:
 
        Socket(const Private &);
        Socket(Family, int, int);
+private:
+       void platform_init();
+       void platform_cleanup();
 public:
        ~Socket();
 
        virtual void set_block(bool);
+       virtual void set_inherit(bool);
+       const IO::Handle &get_handle(IO::Mode);
        virtual const IO::Handle &get_event_handle();
 
        /** Associates the socket with a local address.  There must be no existing
@@ -40,6 +53,9 @@ public:
        const SockAddr &get_local_address() const;
 
        void set_timeout(const Time::TimeDelta &);
+protected:
+       void set_socket_events(unsigned);
+       void set_platform_events(unsigned);
 };
 
 } // namespace Net