Create an OS specific sock_blocks function.
Use sock_blocks function for stratum send and receive.
Use sock_blocks in api.c