Is there any way to send large amounts of data (around 10,000 bytes) relatively fast? I'm currently using socket.recvfrom and it takes around a minute to recieve each message. Edit: This is how I recover the message, sock is a UDP socket, and max_buffer starts at 1024
while True:
try:
data, addr = sock.recvfrom(max_buffer) # buffer
print(data)
break
except OSError:
max_buffer *= 2
data = json.loads(data)
Im not going to paste the code for getting the message because its pretty long, but its a json dictionary which in total takes up around 10000 bytes. This is how I send it:
sock.sendto(json.dumps(data).encode(), address)
I'm sending messages to the server repeatedly.