摘要
网络应用日趋广泛,本文所提出的Android TCP服务器模型及实现的TcpServer类通过多线程类来处理远程客户机的连接请求和数据接收,设置了多种消息用来通知用户连接是否成功并提交接收到的数据,以及数据收发过程中是否出现错误等.该TcpServer类在工程项目中得到了应用,运行可靠,提高了开发效率.
Android network application is becoming more and more extensive. In this paper, on Android platform a message driven TCP server model is established and implemented, in which the connection request from remote client and data receiving is handled by embedded Thread class, with connection establishment and data receiving functioning as messages to main Thread running UI. Prototype class TCP Server has been applied in real project and running reliably.
出处
《海南热带海洋学院学报》
2017年第2期59-63,共5页
Journal of Hainan Tropical Ocean University