创建非阻塞服务器套接字
import java.awt.Graphics; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.channels.ServerSocketChannel; /* N o w J a v a . c o m - 时 代 Java */ public class Main { public void m() { // Create a non-blocking server socket and check for connections try { // Create a non-blocking server socket channel on port 80 ServerSocketChannel ssChannel = ServerSocketChannel.open(); ssChannel.configureBlocking(false); int port = 80; ssChanne