I am using wiced 4.1.0 version and RTOS is Threadx.Network is NetX_Duo.
I took tcp_client application which is present in snip as a reference.In that application 1 client can communicate with the one server.
I want to develop the existing application in which one client can communicate to multiple servers.
can anyone provide me some sample applications or else suggestions to proceed further.
One approach I am thinking is to create threads for each server.If that is the case then if suddenly one server no longer exists and memory will be wasted for that.How do client comes to know that the server is no longer present?
Please refer to https://community.cypress.com/thread/8636. You can check how wiced_tcp_register_callbacks() has been used to handle various TCP events in snip.tcp_server_async. If there is a TCP disconnection, the disconnect callback function will be executed and you can use wiced_tcp_delete_socket() to delete the TCP socket.