Basic Connection Example
import socket print "Creating socket...", s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print "done." print "Connecting to www.java2s.com.", s.connect(("www.java2s.com", 80)) print "done."