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.

Problem on TCP server with Accept API

Hi,

I am facing some problem with my TCP server code. I am using multiple clients to one server, Here accept API is blocking, So after connecting one client how to wait for the second client and parallelly communicate with first client. If the accept is non-blocking then we can solve this issue. I am using the setsockopt API to make the socket non blocking, But it is returning -1every time. So If anyone having the TCP server code(With accept non-blocking), please share the code.

Thanks,

Kartheek.