Hello everyone ,
i'm making a client-server system with comunication through socket.
More clients write on the same socket and, for the specifications, i have to use the command write and read.
When the server run the read on the socket, this take all messages present.
But i want take only one message, the first.
I don't know the size of message and so i read max 1024 characters. For this reason i read on the socket all messages contained in 1024 characters.
These message are separated by "\n".
Please help me with a example that resolve my problem or with good explanation