jaredwolff The TLS buffer is max 2048 bytes and I am currently running a do/while loop sending 800 bytes at a time. This do/while loop is repeated 8 times for 8 fragments. The first buffer always sends with no issues no matter the size. The problem only occurs on the next 7 (no consistently and randomly).
I am sending the ZSOCK_MSG_DONTWAIT
flag. As some pseudocode, I do a send for 800 bytes, if the send fails with a return value of “-1”, I increase offset by one to counteract the -1 return and try to resend the same amount of bytes. Upon success, we move onto the next 800 bytes and repeat until the end of the buffer.
How would I 100% check to see if the send is complete? I don’t have access to any flags or registers inside of the modem to look at. I believe the send function only returns when it is complete with the bytes sent.