You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
301 B
Python

#this script is for the client side
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 3333))
str_recv = s.recv(1024)
print(str(str_recv))
str_send = "I am here!"
s.send(bytes(str_send, 'utf-8'))
str_recv = s.recv(1024)
print(str(str_recv))
s.close()