The question arises when to call available()!
You won’t want a server to loop and poll, or to act in timeslices. So you have to have one thread per connection hanging in a blocking read. Buhhhh…
NIO is definitely worth the effort, together with the beautiful ByteBuffer which I think are much easier to handle than DataOutputStreams e.g.
Effort has to be taken in any case, so why not NIO?
kenrod, check the tutorial and in case problems arise beyond it, contact me privately. As I said, I have some code here willing to share, but it’s not suitable for a forum.
BTW, take care! ByteBuffers have nasty bugs in 1.4.0 (at least one). Make sure to have 1.4.1! (Took me hours to find out…)