• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

2-way TCP (sockets)  RSS feed

 
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a client / server running that includes the following (totally not unusual) lines on the client side.


No problem. Everything works fine. Consulting books and tutorials about two way connections (after finding I had a problem with it), I have the impression that I should just as easily be able to add input so that I can receive a response back from the server; like this:

But when I add that one single statement declaring "in", I get an IOExeption java.io.EOFException. in = null.

I am using "in = new ObjectInputStream(rtSocket.getInputStream())" quite successfully on the server side. Don't see how I could possibly have a problem here. Do you see something I don't? Any ideas?
[ August 05, 2007: Message edited by: Roger F. Gay ]
 
Roger F. Gay
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hold on ... the behavior has changed. Maybe I forgot to save the file before compiling. I'll report back on this later.
 
Roger F. Gay
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess the problem was created by working too many hours. That problem arose at about 11 pm, when I'd started at 7 am.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!