基于套接字的局域网内文件传输软件摘要当今世界科学技术飞速发展,尤其以计算机通信网络为代表的互联网技术更是日新月异,令人眼花燎乱,目不睱接。在计算机与网络迅速发展的今天,借助于网络进行信息资源交流给人们带来了极大的方便。各种文件传输系统都已被广大用户接受。比如QQ、UC、Internet邮件等互联网中运用最为广泛的文件传输工具,但它们之间的文件传输往往对远程服务器有非常大的依赖性,没有彻底实现点对点安全的文件传输。甚至需要花费大量的金钱购买各种移动磁盘或者其他局域网内连接主机的硬件设备。而达到的效果却总是因为传输效率以及安全威胁而受到很大的限制。在这种形势下,开发一个功能简单而实用,并且具有可移植性的局域网内文件传输工具势在必行,信息之间交换技术使用也越来越广泛,比如资料的共享,信息之间的交互,以及文件之间的传输。本论文设计了一个基于linux环境在局域网里实现文件传输的软件,linux环境是如今很公司做软件开始所选着的环境,该软件实现了文件在局域网里的传输,方便了在局域网里内部进行交流,实现信息的同步,进一步提高工作的效率。关键词:文件传输;套接字;linux网络编程;linux系统Socket-basedfiletransfersoftwareintheLANLiangchunlong(CollegeofInformationScienceandEngineering,JishouUniversity,Jishou,Hunan416000)AbstractIntoday'sworldofscienceandtechnologyrapiddevelopment,particularlyinthecomputercommunicationsnetworkoftheInternettechnologyischanging,dizzyingLiaochaosheadXiaaccess.Intherapiddevelopmentoftoday'scomputersandnetwork,bymeansofanetworkexchangeofinformationresourceshasbroughtgreatconveniencetothepeople.Avarietyoffiletransfersystemhavebeenacceptedbythemajorityofusers.ThemostwidelyusedfiletransfertoolssuchasQQ,UC,InternetMail,Internetfiletransferbetweenthemisoftenaverylargedependenceontheremoteserver,notthefullrealizationofthepeer-to-peersecurefiletransfer.EvenneedtospendalotofmoneytobuyavarietyofremovablediskorLANconnectiontothehosthardwaredevices.Wouldbeachievedbecausethetransmissionefficiency,andsecuritythreatsarealwayssubjecttoconsiderablerestrictions.Undersuchcircumstances,thedevelopmentofafunctionissimpleandpractical,andportabilityLANfiletransfertoolisimperative,theinformationexchangedbetweentheuseoftechnologyareincreasinglybeingused,suchasthesharingofinformationbetweentheinformationinteraction,andfiletransmission.Designedalinux-basedenvironment,theLANfiletransfersoftware,linuxenvironmentisnowverycompanytodothesoftwarestartstheselectedenvironment,thesoftwaretoachievethetransmissionoffilesintheLANtofacilitatetheinternalLANexchange,informationsynchronization,andfurtherincreaseefficiencyKeywords:Filetransfer;socket;linuxnetworkprogramming;thelinuxsystem目录第一章绪论••••••••••••••••••••••••••••••••••••••••••••••••••••11.1文件传输的应用背景与概述•••••••••••••••••••11.2开发环境介绍…………1.第二章基本原理2.1文件传输的原理............................................22.2文件传输软件的功能实现......................22.2.1socket函数介绍。。。。。。。22.2.2Socket编程基础重要的数据结构…………62.2.3Socket提供的系统调用或函数的详细讲解…………62.2.4使用到的主要函数介绍(bind,listen,accpet)………62.3软件源代码…………72.3.1发送端源代码………82.3.2接收端源代码………9第三章文件传输软件的使用............103.1接收端的使用………3.2发送端的使用。。。3.3测试结果。。。第四章设计总结...参考文献••••••••••••••••••••••••••••••••••••••••••••••••••••••••••25第一章绪论1.1文件传输的应用背...