This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SocketChannel And Socket Shutdown/recycle

Ahmed Basheer
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Java NIO Sockets and am looking for a way to actually shutdown the tcp socket without closing the SocketChannel. I found method "socketShutdownInput" and "socketShutdownOutput" but they really don't disconnect the socket connection. Right after calling these method if you invoke SocketChannel.isConnected you will get true. Is this bug in Socket NIO or is there actually way to "diconnect", opposite in action to method "connect" on SocketChannel object which will only recyle the socket connection without closing the channel. The problem is if you close the channel then that channel needs to go through all the methods again like open, register etc...

Your suggestions or ideas would be appreciated.

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic