mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-17 14:10:21 -04:00
11 lines
No EOL
283 B
Python
11 lines
No EOL
283 B
Python
DATA = 'GET / HTTP/1.1\r\nHost: google.com\r\n\r\n'
|
|
|
|
def tcp_client():
|
|
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
client.connect((HOST, PORT))
|
|
client.send(DATA)
|
|
response = client.recv(4096)
|
|
print(response)
|
|
|
|
if __name__ == '__main__':
|
|
tcp_client() |