(Socket) Detecting if the other end is finished sending data.
Hi guys! I'm writing a simple client server application in java and I dont want to include a message length header in my messages. How will I know if the other end is finished sending message? I mean without using an indicator char for the end of the message. A message from the sender could end with any byte.
Hope you could help me with this problem. Thanks! :-)
[378 byte] By [
s.E.a.Na] at [2007-10-2 22:07:48]

Hi! thanks for ur reply..actually im afraid i cant use those options because specifically I'm writing a telnet client..Unfortunately the telnet server is a device which does not negotiate End Of Record Option.
Is there any other method that might help me with this problem?
Thanks.
> Hi! thanks for ur reply..actually im afraid i cant
> use those options because specifically I'm writing a
> telnet client..Unfortunately the telnet server is
> a device which does not negotiate End Of Record
> Option.
>
Telnet doesn't send messages like you described either. Its only definition is line oriented.
So whatever you are doing on the server have it do something else at the end so you know it is done.