• Post Reply Bookmark Topic Watch Topic
  • New Topic

changed getInputStream( ) to ObjectInputStream() and app messed up

 
Tomer Gal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've built a server client application which worked fine ( using getInputStream( ) and etc. )
I later decided to change the server client relation so that Object would get transfered between them so I changed my protocol to use ObjectInputStream().
This messed up my entire application, seems that ObjectInputStream() halts the program probably waiting for an input while getInputStream( ) doesn't do that.

What can I do now to fix my application , must I run all the getInputStream( ) and etc. in new Threads or there is a better solution ?
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to initialise ObjectOutputStream first before initialising the ObjectInputStream at both end of the network connection. Hope it helps .

Regards,
Clivant
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!