udp socket example
This commit is contained in:
parent
c94b814cdf
commit
c3e5cfe664
13
udp_socket_client.py
Executable file
13
udp_socket_client.py
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/python2
|
||||
|
||||
import socket
|
||||
import time
|
||||
|
||||
target = "192.168.178.21"
|
||||
port = 5005
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
while 1:
|
||||
s.sendto("test", (target, port))
|
||||
time.sleep(1)
|
Loading…
Reference in New Issue
Block a user