3、java.nio、ServerSocketChannel SocketChannel 堵塞模式使用
publicstaticvoidmain(String[]args)throwsException{//服务端ServerSocketChannelserverSocketChannel=ServerSocketChannel.open();//设置为堵塞模式serverSocketChannel.configureBlocking(true);//绑定本地ip端口serverSocketChan