1、 2014 届毕业设计说明书届毕业设计说明书 基于 Linux 操作系统的聊天软件的设计 学 院: 电气与信息工程学院 学生姓名: 指导教师: 职称 讲师 专 业: 电子信息工程 班 级: 电子 1002 班 完成时间: 2014 年 5 月 摘 要 这篇论文整体是在 linux下并通过网络实现类似于 qq 的的一篇操作报告。开发的框是 C/S 框架,由 server 端和 client 端组成,首先设置好端口参数和 ip 地址,在编译,调试后 实现 server 端与各个 client 端的连接,连接后以后 server 端作为中间端来使客户机实现 通讯,因为服务器只存在一个但是客户端存在多
2、个所以我们必须通过链表去管理,client 端的信息发送通过封装在 socket 结构体中进行传输。本设计采用 TCP/IP协议这样可以保 证连接可靠,而且项目管理中釆用 linux流行的 gcc和 makefile编译,大大提高了编译和调 试效率,提高了项目完成的效率,但是为了模拟几个 client 端我们就需要在 pc 机上再安装 一个虚拟系统来操作 client 端。 本次设计的聊天通信使用全双工,主要实现了功能如:用户的帐号与密码的注册与登录,客 户点对点聊天,客户之间的群聊,以及文件的发送与接收。测试运行后的可靠性满足 Linux 网络聊天的基本要求。关键词关键词: :linux,
3、socket, ,server 端,client 端,网络编程 Abstract This thesis as a whole is under linux platform and through the local area network to achieve similar qq chat. The overall use of C / S framework, the main server -side and client into two parts , set ip and port number , and Linux, compile and debug procedure
4、s to achieve client and server connections each client side , and then as the server -side following transfer to achieve communication between client end . Since only one server -side , and you can have multiple client end , so the server side using a single list to manage multiple client side infor
5、mation , client side encapsulated for transmission of information sent through the body in the socket structure . This design uses the TCP / IP protocol ,so you can ensure reliable connection, but also preclude the use of project management in a popular linux gcc and makefile to compile, compile and
6、 debug greatly improved efficiency , improve the efficiency of the completion of the project, but due to simulate multiple client end Therefore, in the operating environment need to install a virtual system on the PC to operate multiple client side . The chat tool designed for full-duplex communication using communication , to achieve the five main functions: to-peer chat between new user registration and login, user , group chat among users , file encryption tran