Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in calling shutDownInput and shutDownOutput  RSS feed

 
vignesh bala
Greenhorn
Posts: 28
Eclipse IDE Hibernate Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am writing a Socket client . After finishing all the transactions, I amusing the below method to close the socket:





The problem here is: when I call socket.shutDownInput(), I am getting socket Exception with message socket is already closed. But while I am calling socket.isClosed() before calling shutDownInput, its giving false. But after calling shutDownInput, its giving response as true. But actually, I am not calling socket.close() anywhere in the middle. Please help.
Thanks in advance,
Vignesh.B
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would imagine you need to call shutDownInput() and shutDownOutput() _before_ calling in.close() and out.close().
Give it a try and let us know!
Darrin
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!