摘要:随着信息化时代的到来,因特网的应用越来越普遍,基于网络平台的信息交流也越来越频繁。TCP是一种面向连接的传输协议,相对于UDP拥有有更好的安全性,是当今因特网中热门的传输协议。此论文简要介绍基于C#语言使用多线程,同步以及异步的方法实现局域网内的TCP通信模块,运用C#程序语言中提供的支持TCP协议的相关类和工具完成TCP通信模块的搭建,通过分别构建服务器端和客户端实现双方的连接,通信。通过相关调研和市场需求实现软件模块设计,静态和动态分析以及完成代码的实现和后期调试工作,较具体分析了整个开放的实现过程。42885
毕业论文关键词:C#;TCP;线程;
The Design and Implementation of TCP based on C#
Abstract: With the advent of the information age, the Internet is more and more common, web-based information exchange platform for more and more frequent. TCP is a connection-oriented transport protocol with respect to the UDP has better security, today's popular Internet transport protocol. This paper briefly introduced based on C # language using multi-threaded, synchronous and asynchronous methods to achieve TCP communication modules LAN using TCP is supported related classes and tools for C # programming language to provide complete building TCP communication module by building server respectively and clients connect, the communication between the two sides. Through relevant research and market demand for software module design, static and dynamic analysis, and complete implementation of the code and post commissioning work, the more detailed analysis of the entire open implementation process.
Keywords: C #; TCP;Thread; Thesis
目录
1.概述 5
1.1关于信息化 5
1.2开发方法 5
2.调研及可行性分析 6
2.1调研 6
2.2总体目标 6
2.3理论可行性 6
3.线程方法 7
3.1线程服务器 7
3.1.2线程服务器的初始化 9
3.1.3线程服务器的消息接收 10
3.1.4线程服务器的消息发送 12
3.1.5线程服务器的群消息发送 13
3.1.6线程服务器客户端列表 14
3.1.7线程服务器的简单协议 15
3.1.8线程服务器UML类图 17
3.1.9线程服务器UML时序图 18
3.1.10线程服务器开发小结 18
3.2线程客户端 19
3.2.1客户端窗口实现 19
3.2.2线程客户端的初始化 20
3.1.3线程客户端的消息接收 21
3.2.4线程客户端的消息发送 22
3.2.5线程客户端的消息测试 23
3.2.6线程客户端协议说明 24
3.2.7线程客户端UML类图 25
3.2.8线程客户端UML时序图 26
3.2.9线程客户端开发小结 26
4.同步方法