1 Answer

0 votes

There's going to be a maximum, and it might change depending on the state of the TCP/IP stack.

As mentioned in the documentation for sock_fastwrite(), it "write up to len bytes". Use the return value to determine how many bytes weren't written, and repeatedly call sock_fastwrite() until you've written them all.

It looks like the limit is based on how much space is available in the write buffer for the socket. If you increase the buffer, you'll be able to write more, but you'll still need to write your code to handle the case where it writes fewer bytes than you requested.