X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fsocket.h;h=861012b8cc50c0bb2114440f0de2439fcacaa744;hp=6eb29066e03d078a469f897c79c99f35a19ebcbe;hb=4b408e693bcb004ccaa6958610e946cfbeff9465;hpb=5cf15ce8f6b17a47f662eb8f60de619fd6bf7b53 diff --git a/source/socket.h b/source/socket.h index 6eb2906..861012b 100644 --- a/source/socket.h +++ b/source/socket.h @@ -5,11 +5,15 @@ #include #include "constants.h" #include "sockaddr.h" -#include "types.h" namespace Msp { namespace Net { +#ifdef WIN32 +typedef int socklen_t; +#endif + + class bad_socket_state: public std::logic_error { public: @@ -21,13 +25,14 @@ public: class Socket: public IO::EventObject { protected: - SocketHandle handle; - IO::Handle event; + struct Private; + + Private *priv; bool connected; SockAddr *local_addr; SockAddr *peer_addr; - Socket(SocketHandle, const SockAddr &); + Socket(const Private &, const SockAddr &); Socket(Family, int, int); public: ~Socket();