hrydgard/ppsspp — pull request #6101 by hilesaz (2014-05-18 15:51:00+00:00)
Title: Fix nonblocking ptpConnect on Windows

According to
http://msdn.microsoft.com/en-us/library/windows/desktop/ms737625%28v=vs.85%29.aspx
"[...] it is not recommended that applications use multiple calls to
connect to detect connection completion. If they do, they must be
prepared to handle WSAEINVAL and WSAEWOULDBLOCK error values the same
way that they handle WSAEALREADY, to assure robust operation."

Ideally socket->state should be set to a different state and select()
used to poll sockets until state can be switched to closed or
established. Changes to socket->state are visible to games as so
probably should not be done without testing.