add spin lock for select server in windows platform
add function of socket