March 2019
Beginner
490 pages
12h 40m
English
To connect to a remote socket in one direction, we can use the connect() method by using the connect (host, port) format:
import socket# a socket object is created for communicationclient_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)# now connect to the web server on port 80client_socket.connect(("www.packtpub.com", 80))
Read now
Unlock full access