Knightley
asked on
how to make InputStream and OutputStream thread safe.
well, have multiple clients connecting to a Socket Server,
some kind simple chat application.
are the InputStream and OutputStream thread safe,
or do i have do something special to ensure that.
thanx
some kind simple chat application.
are the InputStream and OutputStream thread safe,
or do i have do something special to ensure that.
thanx
> are the InputStream and OutputStream thread safe,
They are since each time you will be getting the input/output stream of the coket connecting to the server.
They are since each time you will be getting the input/output stream of the coket connecting to the server.
ASKER
a server connected with several clients is always thread safe?
i rememer somebody told me it is not, but forget where.
so when i start a server:
1. accept several clients by creating a thread for each.
2. do some input and output
3. do some System.out.println
everything i did above are thread safe?
thanx
i rememer somebody told me it is not, but forget where.
so when i start a server:
1. accept several clients by creating a thread for each.
2. do some input and output
3. do some System.out.println
everything i did above are thread safe?
thanx
The IO is, the thread operations may not be.
;JOOP!
;JOOP!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also the ClientConnection class should implement Runnable. I forgot about it.
:<
ASKER
sorry sciuriware,
i received the CleanUp post, and give the points in a hurry.
in my defense, though your anwsers are correct and swift,
and should receive the points.
they are just so SHORT, i am afraid i overlooked them.
sorry again, if there is a way to send you the points,
tell me how. if not, i hope i could make it up to you somehow.
cu
i received the CleanUp post, and give the points in a hurry.
in my defense, though your anwsers are correct and swift,
and should receive the points.
they are just so SHORT, i am afraid i overlooked them.
sorry again, if there is a way to send you the points,
tell me how. if not, i hope i could make it up to you somehow.
cu
No problem, you can't always :)
This is an interesting forum,
sometimes you get points for almost nothing,
sometimes you work hard on a solution and ... nope.
Don't worry!
;JOOP!
sometimes you get points for almost nothing,
sometimes you work hard on a solution and ... nope.
Don't worry!
;JOOP!
You can still ask a question in Community Support to reopen the question and assign the points to sciuriwar.
I looked this over. Let it be as it is. Next question please ....
ASKER
i think its alright. girionis, u help a lot too.
next time u anwser my question i will give it to
scicuriware. :)
thanx to u both.
next time u anwser my question i will give it to
scicuriware. :)
thanx to u both.
;JOOP!