Using nio for net