use winsoc API in synchronous mode