• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server using java.nio

 
shahabas shabeer
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have developed a chat server using java.net.
Now I would like to upgrade it using java.nio
Could anybody get me good liks to start with.
I would be happy if anybody could post some code samples here.

Thanks
Shahabas E Shabeer
 
Joe Ess
Bartender
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"upgrading" to NIO is kind of a misnomer since the standard java.io classes use nio themselves. The reason to switch to NIO would be to use some of the features that are implemented in NIO which do not exist in the java.io classes, like non-blocking sockets. You can start with this article on Building Highly Scalable Servers with Java NIO
 
Catalin Merfu
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a comm framework that is using non-blocking sockets: http://www.accendia.com
 
li dong
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can look at these NIO Socket examples
NIO Socket
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic