Hello.
I have a question about socket programming. I am using Linux.
I want to establish a connection between a client and a server using the methods: Server: socket(), bind(), listen(), accept(), connect(), send(), recv(), close(). Client: socket(), connect(), send(), recv().
My question is: If I am a client and I want to connect to a server, how do I know if the server exists or not, if it is ready to be connected to, in other words? Can we avoid busy waiting in this case? I read somewhere that the function Select() handles this problem (cuz it's blocking) but I checked it and it isn't?
I read in another place that the function poll() helps select() somehow, but i didn't find anyway a good written code.
Thanks.
Giora.