slightly less hacky, as in, a little bit closer to what the actual PSP does, although the timings are still complete guesses
also
* Protect the adhoc Events by a mutex lock
* don't use emplace_back since symbian doesn't compile with it
Temp revert old version to fix conflict; Implementing built-in PRO Adhoc Server; Add back sceUsbGps
Implementing more Adhoc functions, and some bug fix (i don't remember them anymore)
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.