您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > linux下网络聊天工具的设计和实现
攀枝花学院本科毕业设计(论文)Linux下的网络聊天工具的设计和实现学生姓名:XXXXXXX学生学号:XXXXXXXXXXXX院(系):数学与计算机学院年级专业:09级信息与计算科学指导教师:XXXXX硕士助教二零一三年六月攀枝花学院本科毕业设计(论文)摘要I摘要这个毕业论文整体采用在linux平台下,在同一局域网内实现聊天功能。整体框架主要分为服务端和客户端两个部分,设置好ip和端口号,在Linux下编译和调试两主大块程序,实现服务端和各个客户端的连接,然后以服务端作为中继转实现客户端之间的通信。由于服务端只有一个,而客户端可以有任意多个,所以服务端采用了链表来管理多个客户端的信息,客户端的信息发送通过封装在结构体中进行传输。本设计采用TCP/IP协议保证连接可靠,并在项目管理中采用linux流行的gcc和makefile编译,提高了编译和调试效率,加快了项目的完成速度。由于要模拟多个客户端,所以在运行的环境中需要在PC机上再克隆一个虚拟系统来操作多个客户端。本次设计的聊天工具采用字符串命令行的方式进行通信,主要实现了五个功能:新用户的注册与登录,用户之间一对一的聊天,用户之间群聊,用户之间文件加密传输,用户之间聊天记录保存。经过测试,程序运行可靠,能满足在linux中实现网络聊天的要求。关键词linux,socket,gedit,服务端,客户端,网络编程攀枝花学院本科毕业设计(论文)ABSTRACTIIABSTRACTThisthesisgetstherealizationofchatinthesameLANundertheLinuxplatform.Theoverallframeworkisdividedintotwoparts:serverandclient.SetuptheIPandportnumber,compileanddebugtwomainbulkprogramsintheLinuxandrealizetheconnectionbetweentheserverandtheclients,andthenrealizethecommunicationbetweenclientsbyrelyingonserver.Sincethereisonlyaserver,butaremultipleclients,sotheserveradoptsalinkedlisttomanagemultipleclients’information,andtheinformationofclientsispackedintostructtotransfer.ThisdesignadoptstheTCP/IPprotocoltoensurereliableconnection,andusestheLinuxgccandmakefilecompilerinprojectmanagement,whichimprovesthecompilinganddebuggingefficiency,andspeedsuptheproject’completion.Duetothesimulationofmultipleclients,soitneedstocloneavirtualsysteminthePCmachinetooperatemultipleclientsintherunningenvironment.Thechattoolofthedesignworksbyusingthemethodofcharacterstringcommandline,whichmainlyaccomplishesfivefunctions:newusers’registrationandlogin,biuniquechatbetweenusers,users’groupchat,fileencryptionandtransmissionbetweenusers,users’chatrecordretention.Afterthetest,theprogramisreliable,andcanmeettherequirementsofnetworkchatinLinux.KeywordsLinux,socket,gedit,server,client,networkprogramming攀枝花学院本科毕业设计(论文)目录1目录摘要..................................................................................................................................................IABSTRACT.....................................................................................................................................II1绪论................................................................................................................................................11.1研究背景...............................................................................................................................11.1.1Linux的介绍...........................................................................................................11.1.2linux的发展史.......................................................................................................21.1.3socket介绍.............................................................................................................21.2研究意义..............................................................................................................................31.3国内外研究现状..................................................................................................................32需求分析.......................................................................................................................................52.1功能需求..............................................................................................................................52.2性能需求..............................................................................................................................52.3模块划分...............................................................................................................................62.4模块调用关系......................................................................................................................62.5系统总流程图......................................................................................................................62.6文件信息安全......................................................................................................................83linux网络编程...........................................................................................................................93.1socket概念及功能.............................................................................................................93.2socket类型.........................................................................................................................93.3socket函数.......................................................................................................................103.3.1API功能介绍.........................................................................................................103.3.2套接口地址结构....................................................................................................103.3.3基本转换函数........................................................................................................133.3.4socket编程流程...................................................................................................133.4TCP/IP协议.................................................
本文标题:linux下网络聊天工具的设计和实现
链接地址:https://www.777doc.com/doc-4580867 .html