路在脚下,心向远方

Runtime

转载地址:https://blog.csdn.net/tomcmd/article/details/48971051?depth_1-utm

NIO的网络编程-多线程(二)

[TOC] 转载地址:https://blog.csdn.net/MOTUI/article/details/52792146 NIO 服务器端 package maizi.nio; import java.io.IOException; import java.net.InetSocketAddress; import

NIO的网络编程-简单Demo(一)

[TOC] 转载地址: https://blog.csdn.net/MOTUI/article/details/52792146 Socket 读 if (key.isReadable()) { SocketChannel client = (SocketChannel) key.channel(); // 清空操作 byteBuffer.clear(); // 读取 int read = client.read(byteBuffer); if (read > 0) { // 丢弃换行符 String str = new String(byteBuffer.array(), 0, read); // 通知到TCPServer clientHandlerCallback.onNewMessageArrived(ClientHandler.this, str); } else { Syst

NIO入门

[TOC] 转载地址:https://www.zhihu.com/question/29005375 转载地址:https://yq.aliyun.co

浅析I/O模型

BIO,Reactor模式,NIO,AIO