SyntaxFix
Write A Post
Hire A Developer
Questions
If you are using Python2.6 or newer, it's convenient to use socket.create_connection
socket.create_connection
sock = socket.create_connection(address, timeout=10) sock.settimeout(None) fileobj = sock.makefile('rb', 0)