Very basic networking library using Java NIO