在TCP连接开始到结束连接,之间可能会多次传输数据,也就是服务器和客户端之间可能会在连接过程中互相传输多条消息.理想状况是一方每发送一条消息,另一方就立即接收到一条,也就是一次write对应一次read.但是,现实不总是按照剧本来走. MINA官方文档节选: TCP guarantess delivery of all packets in the correct order. But there is no guarantee that one write operation on the s…