Skip to main content
Asantos
Associate III
Mar 10, 2021 9:24 AM UTC
Question

AzureRTOS, how to transmit TCP large data buffers?

Hi,

I did the function below to transmit TCP data: But I only can transmit up to 4K bytes using this function. If len is bigger than 4K bytes, nx_tcp_socket_send fails.

void TCP_Send(void *buf, uint32_t len)

{

 UINT ret;

 NX_PACKET *send_packet;

nx_packet_allocate(&AppPool,&send_packet,NX_TCP_PACKET,NX_WAIT_FOREVER);  

nx_packet_data_append(send_packet,buf,len,&AppPool,NX_WAIT_FOREVER);

ret = nx_tcp_socket_send(&TCPSocket, send_packet, NX_WAIT_FOREVER);

if(ret) nx_packet_release(send_packet);

}  

This topic has been closed for replies.

2 replies

Walid ZRELLI
Visitor II
Jun 10, 2021 9:45 AM UTC

Hello @Community member​ ,

Your problem has been reported internally. I will keep you updated.

Thank you for your understanding.

BeST Regards,

Walid

Walid ZRELLI
Visitor II
Jun 16, 2021 2:37 PM UTC

Hello @Community member​ 

We have increased the buffer size to more 4096, but we don't see any problems.

Could you please share your example to reproduce your issue?

Thanks in advance.

Walid