论文部分内容阅读
本文设计并实现了基于TCP协议的局域网简单即时通信系统,设计主要应用C/S模式,运用SOCKET套接字接口实现底层通信,并发送和接受TCP数据包、模拟Ethernet帧的发送过程。本通信系统实现了基本通信功能,包括客户端登陆验证、向好友发送文字信息和图片信息以及好友信息的保存。好友间实现文件传输和消息传递是运用P2P方式。本文先从系统设计的背景意义及需求分析入手,主要介绍了发送和接受TCP数据包设计思想和模拟Ethernet帧的发送过程设计思想并阐述了套接字和多线程执行任务等。
This text designs and realizes the local area network simple instant messaging system based on TCP protocol. The design mainly uses C / S mode, uses SOCKET socket interface to realize the bottom communication, and sends and receives TCP data packets to simulate the sending process of Ethernet frames. The communication system realizes basic communication functions, including client login verification, sending text and picture information to friends, and saving friend information. Friends between the file transfer and messaging is the use of P2P. This paper starts with the background and needs analysis of system design. It mainly introduces the design idea of sending and receiving TCP packet and the sending process of analog Ethernet frame, and expounds the execution tasks of socket and multi-thread.