base working sockets for both win and linux