// todo refactor event loops, fix connection timeout in NioSocketChannel