Yes, Yet Another Network Library, but thanks for taking the time to read this post
I often found myself in the need of a network API that was based on NIO, had decent request-response support, and allowed non-blocking packets over the same channel. Basicly multi-threaded support, where multiple threads can request-and-wait-for-response on the same socket-channel.
After a bit of head-scratching I decided to give it a go. The idea was to support the above features, but first I needed a basic framework to handle NIO easily - being able to guarantee that a sent packet of N bytes would be received as a packet of N bytes at the other side, with minimal overhead (currently 1-4 bytes per packet, depending on the number of bytes to be sent). Trival stuff so far, this was the base framework and can be found in the craterstudio.network
package.
In the Sync-layer (the layer above the basic framework), the advanced features are implemented. You can do a request->response from any thread. Other network-frameworks tend to abstract the whole I/O, but for it to be useful to other people, it had to be close to the metal. So we are still sending ByteBuffers and receiving ByteBuffers, only the actual client<->server communication and synchronization are hidden. it can be found in the craterstudio.network.sync
package. I could write quite a lot about it, but a tiny code-example will explain it probably better.
Network API: base example code
Network API: sync example code
The javadoc should be self-explanatory after reading the example codes
If you are interested, please give it a try!
(compiled with Java 1.5)