网站大量收购独家精品文档,联系QQ:2885784924

TCP协议下的即时通讯软件的实现.doc

  1. 1、本文档共26页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
TCP协议下的即时通讯软件的实现

TCP协议下的即时通讯软件的实现 摘 要 即时通(Instant Message),实时性、跨平台性、成本低、效率高等优点一个能够处理户进行实时、安全的即时通具有较强的现实意义。即时的底层通过SOCKE字接口实现。当前的主流UNIX系统和微软的WINDOWS系统都在内核提供了对SOCKET字接口的支持。使用这个统一的接口,可以编写一个可移植的TCP/IP程序。使信息能够在INTERNET上可靠的传输。 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 目 录 论文总页数:28页 1 引言 1 1.1 课题背景 1 1.2 国内外研究现状 1 1.2.1 国外研究现状 1 1.2.2 国内研究现状 2 1.3 本课题研究的意义 2 1.4 本课题的研究方法 2 2 相关技术介绍 2 2.1 .NET开发平台及C#.NET开发语言 2 2.2 TCP协议 3 2.2.1 TCP/IP网络协议 3 2.2.2 TCP——传输控制协议 3 2.3 套接字 4 2.4 流 4 2.4.1 流的基本概念 4 2.4.2 .NET中的流 4 2.5 同步、异步、阻塞和非阻塞 5 2.6 C/S模型 5 2.7 即时通信协议 6 3 系统总体设计 7 3.1 需求分析 7 3.2 系统基本架构 7 3.3 功能模块设计 7 3.4 逻辑图 9 3.5 数据库设计 10 3.5.1 实体关系图 10 3.5.2 详细列表 10 4 系统实现 11 4.1 使用XML定义的即时通信协议 11 4.1.1 信息结构MESSAGE.CSUMESSAGE.CS 11 4.1.2 数据结构FriendStruct 12 4.2 数据库连接类 14 4.3 服务器端 15 4.3.1 同步套接字网络监听 15 4.3.2 多线程 19 4.3.3 计时器 19 4.4 客户端 20 4.4.1 同步套接字客户端 20 4.4.2 采用异步套接字的文件传输 23 结 论 25 参考文献 26 引言 课题背景 即时通信是一个终端连往一个即时通信网路的服务。即时通信不同于e-mail在于它的交谈是实时的。大部分的即时通信服务提供了presence awareness的特性──显示联络人名单,联络人是否在在线与能否与联络人交谈。 最早的即时

文档评论(0)

2017meng + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档