X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fdatagramsocket.cpp;h=7944532aa673a4e09ae0ae619bc98e719e381e62;hb=e131f8b448a24aff7cb556748cb67c6c4496b606;hp=9779bfeb268acb4722c3f21fb85b251405856c1c;hpb=3103b110c863c19a56cc176a173cc30ddf13afec;p=libs%2Fnet.git diff --git a/source/datagramsocket.cpp b/source/datagramsocket.cpp index 9779bfe..7944532 100644 --- a/source/datagramsocket.cpp +++ b/source/datagramsocket.cpp @@ -14,7 +14,12 @@ namespace Net { DatagramSocket::DatagramSocket(Family f, int p): Socket(f, SOCK_DGRAM, p) -{ } +{ +#ifdef WIN32 + WSAEventSelect(handle, event, FD_READ|FD_CLOSE); +#endif + set_events(IO::P_INPUT); +} int DatagramSocket::connect(const SockAddr &addr) { @@ -86,10 +91,5 @@ unsigned DatagramSocket::recvfrom(char *buf, unsigned size, SockAddr *&addr_) return ret; } -IO::PollEvent DatagramSocket::get_initial_events() const -{ - return IO::P_INPUT; -} - } // namespace Net } // namespace Msp