سوال
سلام من میخوام تو کامل کردن این کد کمکم کنید این کد یک چت کوچک است سرور: from socket import * import threading ip = "192.168.9.26" port = 1542 tcp = socket(AF_INET, SOCK_STREAM) tcp.bind((ip,port)) tcp.listen() client , addr = tcp.accept() def give(): print(client.recv(1024).decode()) def send(): msg = input("").encode() client.sendall(msg) while True: t1 = threading.Thread(target=give) t2 = threading.Thread(target=send) t1.start() t2.start() کلاینت: from socket import ...
در حال بررسی 0
1 سال 1 پاسخ 110 دیده شده