-#ifdef _WIN32
-#include <winsock2.h>
-#endif
-#include <cerrno>
+#include "platform_api.h"
#include <msp/core/refptr.h>
#include <msp/core/systemerror.h>
#include <msp/io/handle_private.h>
if(err==-1)
throw system_error("listen");
-#ifdef _WIN32
- WSAEventSelect(priv->handle, *priv->event, FD_ACCEPT);
-#endif
- set_events(IO::P_INPUT);
+ set_socket_events(S_ACCEPT);
listening = true;
}