基于TCP協议的简单即时通信软件的设计与实现.docVIP

  • 7
  • 0
  • 约9.68千字
  • 约 23页
  • 2016-11-27 发布于重庆
  • 举报

基于TCP協议的简单即时通信软件的设计与实现.doc

基于TCP協议的简单即时通信软件的设计与实现

PAGE 毕 业 设 计(论 文) 基 于 TCP协 议 的 数 据 网 络 通 信 设 计 系 别: 信息技术系 专业名称: 通信技术 学生姓名: 李芳 学 号: 2009513230 指导教师: 周燕 完成日期 2012年 4 月 西安科技大学高新学院毕业论文(设计) PAGE PAGE 21 基于TCP协议的简单即时通信软件的设计与实现 摘 要 即时通信(Instant Message),由于其具有实时性、跨平台性、成本低、效率高等优点而受到广泛的使用。设计并实现一个能够处理多用户进行实时、安全的即时通信系统具有较强的现实意义。即时通信的底层通信是通过SOCKET套接字接口实现的。当前的主流UNIX系统和微软的WINDOWS系统都在内核提供了对SOCKET字接口的支持。使用这个统一的接口,可以编写一个可移植的TCP/IP通信程序。使信息能够在INTERNET上可靠的传输。 本文设计并实现了基于局域网内的简单即时通信系统,系统采用C/S模式,底层通信通过SOCKET套接字接口实现,服务器负责客户端的登录验证,好友信息的保存和心跳报文的发送。客户端采用P2P方式实现消息传递,并能实现文件的传输。本文首先讨论了同步套接字,异步套接字,多线程并发执行任务等;然后阐述了客户端、服务器如何使用XML序列化的消息进行通信。 关键词:即时通信;文件传输;套接字;TCP协议 The Design and Implementation of Simple Instant Message Software Based on TCP Protocol Abstract Instant messages have several advantages such as real-time, cross-platform, cheap and efficient. To design a Multi-user IM (instant message) architecture is very important in both theory and realism. Instant message based on TCP/IP protocol that is realized by socket interface. Almost all UNIX operation systems and Microsofts windows operation systems provide support of socket in the kernel. Using the uniform interface, we can develop a portable program of TCP/IP, which help us transfer information in Internet safely and credibly. The system uses the client/server(C/S) mode. The server takes the responsibility of the login message of client, the saving of friend message and Message heartbeat. The transmission of the basic messages of the customer end will be designed on P2P architecture. This thesis explains how the client and server communicate via serializing XML message. Key words: Instant Message; File Transfer; Socket; TCP protocol FILENAME 基于TCP协议的简单即时通信软件的设计与实现.doc目 录 TOC \o 1-3 \h \z \u HYPERLINK \l _Toc174246985 1 引言 PAGEREF _Toc174246985 \h 1 HYPERLINK \l _Toc174246986 1.1 课题背景 PAGE

文档评论(0)

1亿VIP精品文档

相关文档