Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading and writing

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exceptions? (A stack trace and the relevant exerpt from your code would be lovely).
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic