hi.. is it possible to send values in a socket one at a time..
like sending one then close socket connection then open it again and send another one but different..
thanks...
hi.. is it possible to send values in a socket one at a time..
like sending one then close socket connection then open it again and send another one but different..
thanks...
The other side might get really upset with you opening and closing new connections, plus that is kind of stupid.
> or should i send all the services in a big chunk of data?
> or send them one at a time?
So long as the receiver can tell when one ends and the next starts, send them all in quick succession.
TCP is just a stream of bytes, it's up to the sender/receiver to agree a protocol.
HTTP for example uses printable characters separated by newlines.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
what i just did was i send them in a big chunk of data... when i got it from my client side..
it was written in like.. httpd#up#smtp#down#xinetd#up and so on..
i seperated them by a delimiter "#"
i saw a site that specify if that service is down by socket..
it says "connection timeout to socket".. i dont know how to that?
is there a tutorial leading to that way? thanks for the replies..