]> git.tdb.fi Git - libs/net.git/commitdiff
Set event types on Windows if connect finished immediately
authorMikko Rasa <tdb@tdb.fi>
Fri, 10 Apr 2015 18:08:22 +0000 (21:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 10 Apr 2015 18:08:22 +0000 (21:08 +0300)
source/net/streamsocket.cpp

index 1dab2e3aba39ebbcc77bbb5b7927ddcc7f7b654a..85f2b00a05d33e7820a022f6bb0e83716d0829f5 100644 (file)
@@ -73,6 +73,9 @@ bool StreamSocket::connect(const SockAddr &addr)
        if(err==0)
        {
                connected = true;
+#ifdef WIN32
+               WSAEventSelect(priv->handle, *priv->event, FD_READ|FD_CLOSE);
+#endif
                set_events(IO::P_INPUT);
                signal_connect_finished.emit(0);
        }