Skip to content

Instantly share code, notes, and snippets.

@yukaizhao
yukaizhao / NIOClient.java
Created October 7, 2015 01:24
nio client example
package cn.outofmemory.hello.nio;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;