File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Server using java.nio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Server using java.nio" Watch "Server using java.nio" New topic

Server using java.nio

shahabas shabeer
Ranch Hand

Joined: Feb 23, 2004
Posts: 49
Hi friends,
I have developed a chat server using
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.

Shahabas E Shabeer

The greatest pleasure in life is doing what peoples say you can not do.
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

"upgrading" to NIO is kind of a misnomer since the standard 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 classes, like non-blocking sockets. You can start with this article on Building Highly Scalable Servers with Java NIO

[How To Ask Questions On JavaRanch]
Catalin Merfu
Ranch Hand

Joined: May 26, 2004
Posts: 42
Use a comm framework that is using non-blocking sockets:

Catalin Merfu<br /><a href="" target="_blank" rel="nofollow">High Performance Java Networking</a>
li dong

Joined: Mar 19, 2005
Posts: 1
you can look at these NIO Socket examples
NIO Socket
I agree. Here's the link:
subject: Server using java.nio
It's not a secret anymore!