forked from stud160545/test
add files
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import socket
|
||||
|
||||
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
client.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||
client.sendto(b'hello server', ('255.255.255.255', 10001))
|
||||
data, _ = client.recvfrom(1024)
|
||||
print(f"Ответ от сервера: {data.decode()}")
|
||||
client.close()
|
||||
Reference in New Issue
Block a user