Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHi everyone,
In TCP client programming, we use connect() to establish a new TCP connection. connect() returns zero on success or -1 on error. If server is up , connect() returns zero and client connects to server. what if server is down? I placed connect() in while loop with a condition to exit from while loop when it returns ZERO(connects successfully). It doesn't work......... suggest me a solution in client program to connect a server which can come UP and go DOWN at any time.