import socket def tcp_connect(): host = "77.88.55.242" port = 80 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, port)) s.close() def main(): tcp_connect() if __name__ == "__main__": main()