Hi,
Your program first waits for the first client to connect. So nothing is written
anywhere.
You can check by running "nc -v localhost " in another terminal.
After the first client disconnects it keeps looping in the while and the print
will return 0 which means failure.
Something like th
Hi,
Just try it!
I think you will get an error that you are writing to a not-connected socket.
From "man 2 write":
" [EPIPE]An attempt is made to write to a socket of type SOCK_STREAM
that is not connected to a peer socket."
See also "man 2 send" and "man 2 socket" for a lot