This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AMIC110: NDK: Unable to limit the TCP connections

Part Number: AMIC110

Hello,

I am using ndk_3_61_01_01 and pdk_am335x_1_0_16.

I am creating a TCP connection with DaemonNew as shown below,

DaemonNew(SOCK_STREAMNC, 0, TCP_PORT, TCP_ReceiveTask, 4,  2048, NULL, MaxSpawn);

MaxSpawn= 1;

Ip.socketMaxConnections = 1;

When I am making the first connection, communication is working fine.

When I am trying to make the second connection, I am getting the only ack from the NDK. Why is NDK responding the ACK to the second connection when the maximum connection is 1? NDK should not respond to the second connection, right?

When I checked, I get to know the NDK is using a queue for socket connection. When using the queue for the second connection, I think NDK is storing the data in the PBM buffer and when there is continuous data from the second connection, the PBM buffer is getting full and then all the communication is getting affected. How to disable the queue when the maximum TCP connection is reached?

I want NDK not to respond to the new connection when the maximum connection is reached.

Please guide me on how to control the socket queue or disable the queue process when maximum socket connection is reached.