Java非阻塞I/O的应用  

Application of Java Non-Blocking I/O

在线阅读下载全文

作  者:乙东记[1] 

机构地区:[1]中国兵器工业第58研究所军品部,四川绵阳621000

出  处:《兵工自动化》2006年第2期58-59,共2页Ordnance Industry Automation

摘  要:采用Java非阻塞I/O方式,一个线程可同时响应多个连接,能解决网络数据传输速度与PC机内数据交换速度不匹配。其客户端通过传递true(阻塞)或false(非阻塞)参数到configureBlocking(),改阻塞模式为非阻塞,客户端程序即可在单线程模式下无阻塞运行。服务器端通过建立服务器通道、设置阻塞模式、处理连接等实现。If the system adopted Java non-blocking I/O, one thread can process multiple connections at a time by Java non-blocking I/O APIs, which can solve the problem of the mismatch between the network speed and the speed in PC. The client can run in single thread in non-blocking mode by passing the parameter "true" or "false" to the configureBlockingO, which can change the working mode, The server is implemented with building the server channel, setting the blocking mode and processing the connections.

关 键 词:Java非阻塞 线程 客户端 服务器端 

分 类 号:TP31[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象