Sending big data more than 10KB

Hi All,
If I send small buffer via WiFi it works fine but when I try to send data about 10KB it does’t work. Some times it crashes depends on size.
If it does’t crash it return an interesting result.

if (isSocketAlive() == true) {
        auto rs = write(fd, (void *)buff, 10000);
       printf("XCommClient send body rs:%s %d; fd:%d; err:%d; sz:%d\n", (char *)buff, rs, fd, errno,
               serializedSize + strlen(dump));

-1; fd:3; err:0; sz:12579
Not sent but errno is 0.

What the limitation of data size? If it impossible to change it how to workaround?

HI @Tuxford ,

Recently we have modified the senddata() API in core/ard_socket.c in commit: Update send_data() in ard_socket.c (#203) · ambiot/ambd_arduino@b31ef1d · GitHub

Maybe you could try whether this new API would help with this issue, this sperate the large data size into chunk of TCP_MSS(1460 Bytes) and send accordingly.

Thank you.