Funny, I was here for asking questions about IPC.
And I might be wrong, but what you are using is not IPC.
IPC are a special kind of socket for communicating between processes. You don't need an host/port or any networking.
Yours is just the common socket, used for client-server communication.
So, this being said here is what appends in your code:
/1 You make your server socket.
This socket is just here to listen to new connections.
2/ you enter the loop.
2.a/ Whenever you call accept() the program freezes until a new client tries to connect.
When the connection is opened, he creates a new socket and proceeds.
2.b/ Trace.
2.c/ Some messages are sent.
2.d/ The connection is closed.
2.e/ We end the loop, and go back to 2.a, therefor the process is blocked again until a new connection appends.
So it does loop. If you refresh/restart your client, it will connect again. Send a message. Close the socket. Loop. Wait.
If you had no while(true), the application would close after the connection is closed ( server or not ).
What else...
1/ I am not sure if blocking also affects the accept blocking, but if you want to try this, make sure the socket you set non blocking is the 's' socket, the one listening for new connections, not the 'c' socket.
2/ If you want to send info about the client, just do s.send( "whatever information" ) on the client, and raw = c.read() on the server.
3/ I prefer to use ServerLoop, that handles most of the work, including the threading, and present you with only what you really need. But I actually can't find a proper sample...