Delphi 编写TCP/IP网络Socket通信程序

上传者: kilnok | 上传时间: 2021-06-15 09:45:48 | 文件大小: 1.51MB | 文件类型: RAR
本例子就是Delphi中如何利用Socket编写通信程序。 计算机网络是由一系列网络通信协议组成的,其中的核心协议是传输层的TCP/IP和UDP协议。TCP是面向连接的,通信双方保持一条通路,好比目前的电话线,使用telnet登陆BBS,用的就是TCP协议;UDP是无连接的,通信双方都不保持对方的状态,浏览器访问Internet时使用的HTTP协议就是基于UDP协议的。TCP和UDP协议都非常复杂,尤其是TCP协议,为了保证网络传输的正确性和有效性,必须进行一系列复杂的纠错和排序等处理。   Socket是建立在传输层协议(主要是TCP和UDP)上的一种套接字规范,最初是由美国加州Berkley大学提出,它定义两台计算机间进行通信的规范(也是一种编程规范),如果说两台计算机是利用一个“通道“进行通信,那么这个“通道“的两端就是两个套接字。套接字屏蔽了底层通信软件和具体操作系统的差异,使得任何两台安装了TCP协议软件和实现了套接字规范的计算机之间的通信成为可能。   微软的Windows Socket规范(简称winsock)对Berkley的套接字规范进行了扩展,利用标准的Socket的方法,可以同任何平台上的Socket进行通信;利用其扩展,可以更有效地实现在Windows平台上计算机间的通信。在Delphi中,其底层的Socket也应该是Windows的Socket。Socket减轻了编写计算机间通信软件的难度,但总的说来还是相当复杂的(这一点在后面具体会讲到);Inprise在Delphi中对Windows Socket进行了有效的封装,使得用户可以很方便地编写网络通信程序。 本例子就是Delphi中如何利用Socket编写通信程序。

文件下载

资源详情

[{"title":"( 55 个子文件 1.51MB ) Delphi 编写TCP/IP网络Socket通信程序","children":[{"title":"Tcp IP 通信程序编写","children":[{"title":"Client","children":[{"title":"SHYClientPrj.dof <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false},{"title":"__history","children":[{"title":"SHYClient.pas.~17~ <span style='color:#111;'> 4.26KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~11~ <span style='color:#111;'> 3.88KB </span>","children":null,"spread":false},{"title":"SHYClient.dfm.~2~ <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~12~ <span style='color:#111;'> 3.92KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~13~ <span style='color:#111;'> 4.08KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~14~ <span style='color:#111;'> 4.25KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~16~ <span style='color:#111;'> 4.25KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~9~ <span style='color:#111;'> 3.87KB </span>","children":null,"spread":false},{"title":"SHYClient.dfm.~3~ <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false},{"title":"SHYClient.dfm.~4~ <span style='color:#111;'> 2.70KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~10~ <span style='color:#111;'> 3.87KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~18~ <span style='color:#111;'> 4.28KB </span>","children":null,"spread":false},{"title":"SHYClient.dfm.~1~ <span style='color:#111;'> 2.64KB </span>","children":null,"spread":false},{"title":"SHYClient.pas.~15~ <span style='color:#111;'> 4.25KB </span>","children":null,"spread":false}],"spread":false},{"title":"SHYClient.ddp <span style='color:#111;'> 51B </span>","children":null,"spread":false},{"title":"__recovery","children":null,"spread":false},{"title":"SHYClient.dfm <span style='color:#111;'> 2.72KB </span>","children":null,"spread":false},{"title":"SHYClientPrj.dproj <span style='color:#111;'> 6.41KB </span>","children":null,"spread":false},{"title":"SHYClientPrj.dpr <span style='color:#111;'> 218B </span>","children":null,"spread":false},{"title":"SHYClientPrj.dproj.local <span style='color:#111;'> 62B </span>","children":null,"spread":false},{"title":"SHYClientPrj.res <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false},{"title":"SHYClientPrj.cfg <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"SHYClient.pas <span style='color:#111;'> 4.29KB </span>","children":null,"spread":false},{"title":"SHYClientPrj.stat <span style='color:#111;'> 164B </span>","children":null,"spread":false},{"title":"SHYClientPrj_Icon.ico <span style='color:#111;'> 766B </span>","children":null,"spread":false},{"title":"SHYClient.dcu <span style='color:#111;'> 10.59KB </span>","children":null,"spread":false},{"title":"SHYClientPrj.identcache <span style='color:#111;'> 169B </span>","children":null,"spread":false},{"title":"SHYClientPrj.exe <span style='color:#111;'> 2.25MB </span>","children":null,"spread":false}],"spread":false},{"title":"Server","children":[{"title":"__history","children":[{"title":"SHYServer.dfm.~3~ <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~4~ <span style='color:#111;'> 4.35KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~2~ <span style='color:#111;'> 4.03KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~1~ <span style='color:#111;'> 3.99KB </span>","children":null,"spread":false},{"title":"SHYServer.dfm.~1~ <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~6~ <span style='color:#111;'> 5.19KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~3~ <span style='color:#111;'> 4.04KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~5~ <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false},{"title":"SHYServer.dfm.~4~ <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~8~ <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false},{"title":"SHYServer.dfm.~2~ <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":"SHYServer.pas.~7~ <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false}],"spread":false},{"title":"SHYServer.dcu <span style='color:#111;'> 9.16KB </span>","children":null,"spread":false},{"title":"SHYServerPrj_Icon.ico <span style='color:#111;'> 766B </span>","children":null,"spread":false},{"title":"SHYServerPrj.cfg <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"SHYServerPrj.dpr <span style='color:#111;'> 218B </span>","children":null,"spread":false},{"title":"SHYServerPrj.dproj.local <span style='color:#111;'> 62B </span>","children":null,"spread":false},{"title":"SHYServerPrj.stat <span style='color:#111;'> 158B </span>","children":null,"spread":false},{"title":"SHYServerPrj.exe <span style='color:#111;'> 2.26MB </span>","children":null,"spread":false},{"title":"SHYServer.ddp <span style='color:#111;'> 51B </span>","children":null,"spread":false},{"title":"SHYServerPrj.res <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"SHYServerPrj.identcache <span style='color:#111;'> 169B </span>","children":null,"spread":false},{"title":"SHYServerPrj.dof <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false},{"title":"SHYServerPrj-OLD.exe <span style='color:#111;'> 475.50KB </span>","children":null,"spread":false},{"title":"SHYServer.dfm <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"SHYServer.pas <span style='color:#111;'> 5.24KB </span>","children":null,"spread":false},{"title":"SHYServerPrj.dproj <span style='color:#111;'> 6.66KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

  • fqfq123456 :
    太简单了,没多大意思
    2018-12-19
  • eytech8848 :
    再下一下试一试
    2018-12-07
  • bingyandong :
    用着不错就是找不到了在下一次
    2018-12-01
  • publicthii :
    用着不错就是找不到了在下一次
    2018-11-12

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明