Forums Register Login

Reading and writing

+Pie Number of slices to send: Send
I am new to using sockets but I have a simple server socket running and a client socket which reads what the servers writes (using the writeUTF() method of DataOutputStream). This works fine but I've been trying to get it to work the other way at the same time - where the client writes a message to the server and I can display it on the server side. Basically I have input and output objects in both the server and the client socket objects. I'm getting exceptions when I try all of this so my question is; is this possible at all and if it is, how do I go about doing it?
Thanks.
Paul
+Pie Number of slices to send: Send
What exceptions? (A stack trace and the relevant exerpt from your code would be lovely).
- Peter
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 994 times.
Similar Threads
Send messages to clients selectively?
transfer data from thread to threads
HTTP Protocols and Servers
How to reset socket???
write() method of DataOutputStream not throwing exception
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:11:09.