stream closed error
hi every body,
i am trying to make a simple chat program and in the network implementation i have made a server/client connection but when i run it and try to send a message from the client to server a sudden error occur it says "stream closed" when trying to send a data using the server's socket e.g "serverstr=clientin.readLine();" where the 'clientin' is the input stream that takes the data from the socket.
but i am not closing the stream in the while loop.
thanks.
(if no one understand what i wrote pease reply)
[553 byte] By [
kmhosnya] at [2007-11-27 10:34:00]

# 3
> i am sorry but what do you mean by "the other end is
> closing the socket"
I mean that the other end is closing the socket.
Why is that so difficult to understand? A socket has two ends (two (usually two but it can be one) computers talking to each other). You are reading from one end and getting an exception when the stream closes. You say you are not closing the stream at your end so....
The other end is closing the socket.
# 4
Actually 'stream closed' means that this end has closed the socket. (A null from readLine() would mean the other end has closed.) Probably the OP has closed the output stream, which closes the input stream and the socket too.
ejpa at 2007-7-28 18:26:07 >
