using pure nio instead of netty