-#ifndef WIN32
+#ifdef WIN32
+#include <winsock2.h>
+#else
#include <sys/socket.h>
#endif
#include <cerrno>
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);
}
int err;
socklen_t len = sizeof(int);
- get_option(SOL_SOCKET, SO_ERROR, &err, &len);
+ priv->get_option(SOL_SOCKET, SO_ERROR, &err, &len);
if(err!=0)
{
{
int err;
socklen_t len = sizeof(err);
- get_option(SOL_SOCKET, SO_ERROR, &err, &len);
+ priv->get_option(SOL_SOCKET, SO_ERROR, &err, &len);
connecting = false;
connected = (err==0);