X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fsocket.h;h=6e0a497a08d855db1fcb506dc9c91ebfb2eb9a50;hb=6625cf0e574406425c35d33110f8d99617e902df;hp=a3823ee44d777d008a3454ee0d76e4d90cac7d42;hpb=6df110603b3a1248f52741e9d68d0bd032171b60;p=libs%2Fnet.git diff --git a/source/net/socket.h b/source/net/socket.h index a3823ee..6e0a497 100644 --- a/source/net/socket.h +++ b/source/net/socket.h @@ -1,6 +1,7 @@ #ifndef MSP_NET_SOCKET_H_ #define MSP_NET_SOCKET_H_ +#include #include #include #include "constants.h" @@ -9,10 +10,10 @@ namespace Msp { namespace Net { -class bad_socket_state: public std::logic_error +class bad_socket_state: public invalid_state { public: - bad_socket_state(const std::string &w): std::logic_error(w) { } + bad_socket_state(const std::string &w): invalid_state(w) { } }; @@ -29,8 +30,8 @@ protected: struct Private; - Private *priv; - SockAddr *local_addr; + Private *priv = 0; + SockAddr *local_addr = 0; Socket(const Private &); Socket(Family, int, int); @@ -40,10 +41,10 @@ private: public: ~Socket(); - virtual void set_block(bool); - virtual void set_inherit(bool); + void set_block(bool) override; + void set_inherit(bool) override; const IO::Handle &get_handle(IO::Mode); - virtual const IO::Handle &get_event_handle(); + const IO::Handle &get_event_handle() override; /** Associates the socket with a local address. There must be no existing users of the address. */