There was an error while loading. Please reload this page.
1 parent 6b02ecf commit 135318aCopy full SHA for 135318a
Socket_program/echo-client.py
@@ -0,0 +1,11 @@
1
+import socket
2
+
3
+HOST = "127.0.0.1" # The server's hostname or IP address
4
+PORT = 65432 # The port used by the server
5
6
+with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
7
+ s.connect((HOST, PORT))
8
+ s.sendall(b"Hello, Vladimir!")
9
+ data = s.recv(1024)
10
11
+print(f"Received {data!r}")
0 commit comments