Php_eol using Apache Mina framework Practice
1. Why use Apache Mina framework Apachemina Server is a network communication application framework, Mina can help us quickly develop high-performance, high-scalability network communications applications, Mina provides event-driven, asynchronous (Mina asynchronous IO The default is to use the programming model of Javanio as the underlying support) operation. The 2.ApacheMina framework uses Mina's execution flow: > Ioservice: This interface is responsible for socket creation on one thread, has its own selector, and listens for connections being established. > ioprocessor: This interface on another thread is responsible for checking that there is data read and write on the channel, which means it also has its own selector, which is a difference from when we use Java NIO encoding, usually in Java NIO coding, We are all using a selector, that is, do not differentiate between Ioservice and ioprocessor two functional interfaces. In addition, Ioprocessor is responsible for invoking the filter registered on Ioservice and calling Iohandler after the filter chain. >iofilter: This interface defines a set of interceptors that can include features such as log output, blacklist filtering, data encoding (write direction), and decoding (read direction), where the encode and decode of the data are the most important and you are using Mina The most important areas of concern. >iohandler: This interface is responsible for writing business logic, which is where the data is received and sent. Line break UNIX series with the \nwindows series with the \r\nmac \rphp can be replaced with php_eol, to improve the code-level portability such as: Similarly, directory_separator can use the function get_defined_constants () to get all the PHP constants
http://www.bkjia.com/PHPjc/1078283.html www.bkjia.com true http://www.bkjia.com/PHPjc/1078283.html techarticle Php_eol using Apache Mina Framework Practice 1. Why use Apache Mina framework Apachemina Server is a network communication application framework, Mina can help us quickly develop high-performance, high-scalability ...