1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| import time
| import socket
|
| packed_count = 0
| if __name__ == '__main__':
| files = ["../../MicroWaveData/packet{}.udp".format(i) for i in range(0, 16)]
|
| for file in files:
| with open(file, "rb") as f:
| message = f.read()
| client_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
| client_socket.settimeout(1.0)
| addr = ("127.0.0.1", 9911)
| client_socket.sendto(message, addr)
| time.sleep(0.1)
|
|