TCP/IP网络协议程序设计-聊天室

上传者: youhimer | 上传时间: 2022-05-15 11:05:48 | 文件大小: 239KB | 文件类型: RAR
一个完整的socket有一个本地唯一的socket号,由操作系统分配。 最重要的是,socket 是面向客户/服务器模型而设计的,针对客户和服务器程序提供不同的socket 系统调用。客户随机申请一个socket (相当于一个想打电话的人可以在任何一台入网电话上拨号呼叫),系统为之分配一个socket号;服务器拥有全局公认的 socket ,任何客户都可以向它发出连接请求和信息请求(相当于一个被呼叫的电话拥有一个呼叫方知道的电话号码)。 socket利用客户/服务器模式巧妙地解决了进程之间建立通信连接的问题。服务器socket 半相关为全局所公认非常重要。读者不妨考虑一下,两个完全随机的用户进程之间如何建立通信?假如通信双方没有任何一方的socket 固定,就好比打电话的双方彼此不知道对方的电话号码,要通话是不可能的。

文件下载

资源详情

[{"title":"( 74 个子文件 239KB ) TCP/IP网络协议程序设计-聊天室","children":[{"title":"TCPIP网络协议程序设计-聊天室","children":[{"title":"1","children":[{"title":"TCPIP网络协议程序设计-聊天室.doc <span style='color:#111;'> 123.00KB </span>","children":null,"spread":false},{"title":"程序","children":[{"title":"TCPchat","children":[{"title":"TCP聊天客户端","children":[{"title":"StdAfx.cpp <span style='color:#111;'> 212B </span>","children":null,"spread":false},{"title":"CSocketcli.cpp <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 963B </span>","children":null,"spread":false},{"title":"CSocketcli.opt <span style='color:#111;'> 68.00KB </span>","children":null,"spread":false},{"title":"CSocketcliDlg.cpp <span style='color:#111;'> 7.15KB </span>","children":null,"spread":false},{"title":"CSocketcliDlg.h <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false},{"title":"CSocketcli.ncb <span style='color:#111;'> 105.00KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"CSocketcli.exe <span style='color:#111;'> 48.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"ReadMe.txt <span style='color:#111;'> 3.57KB </span>","children":null,"spread":false},{"title":"CSocketcli.dsw <span style='color:#111;'> 543B </span>","children":null,"spread":false},{"title":"CSocketcli.clw <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"CSocketcli.rc <span style='color:#111;'> 6.11KB </span>","children":null,"spread":false},{"title":"Release","children":[{"title":"CSocketcli.res <span style='color:#111;'> 2.96KB </span>","children":null,"spread":false},{"title":"CSocketcliDlg.obj <span style='color:#111;'> 30.86KB </span>","children":null,"spread":false},{"title":"CSocketcli.obj <span style='color:#111;'> 8.59KB </span>","children":null,"spread":false},{"title":"StdAfx.obj <span style='color:#111;'> 792B </span>","children":null,"spread":false},{"title":"CSocketcli.exe <span style='color:#111;'> 24.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"res","children":[{"title":"CSocketcli.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"CSocketcli.rc2 <span style='color:#111;'> 402B </span>","children":null,"spread":false}],"spread":false},{"title":"CSocketcli.dsp <span style='color:#111;'> 4.17KB </span>","children":null,"spread":false},{"title":"CSocketcli.aps <span style='color:#111;'> 35.89KB </span>","children":null,"spread":false},{"title":"CSocketcli.plg <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"CSocketcli.h <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":false},{"title":"TCP聊天服务器端","children":[{"title":"StdAfx.cpp <span style='color:#111;'> 209B </span>","children":null,"spread":false},{"title":"CSocketDlg.cpp <span style='color:#111;'> 7.14KB </span>","children":null,"spread":false},{"title":"CSocket.dsp <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 822B </span>","children":null,"spread":false},{"title":"CSocket.clw <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"CSocket.h <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"CSocket.dsw <span style='color:#111;'> 537B </span>","children":null,"spread":false},{"title":"CSocket.plg <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"CSocket.ncb <span style='color:#111;'> 137.00KB </span>","children":null,"spread":false},{"title":"CSocket.opt <span style='color:#111;'> 64.50KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"CSocket.exe <span style='color:#111;'> 48.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"CSocket.cpp <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 3.51KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"CSocketDlg.h <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":"Release","children":[{"title":"CSocket.exe <span style='color:#111;'> 24.00KB </span>","children":null,"spread":false},{"title":"CSocketDlg.obj <span style='color:#111;'> 24.09KB </span>","children":null,"spread":false},{"title":"StdAfx.obj <span style='color:#111;'> 792B </span>","children":null,"spread":false},{"title":"CSocket.obj <span style='color:#111;'> 8.55KB </span>","children":null,"spread":false},{"title":"CSocket.res <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false}],"spread":false},{"title":"res","children":[{"title":"CSocket.rc2 <span style='color:#111;'> 399B </span>","children":null,"spread":false},{"title":"CSocket.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"CSocket.aps <span style='color:#111;'> 20.88KB </span>","children":null,"spread":false},{"title":"CSocket.rc <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"Chat_Room","children":[{"title":"lookup_main.cpp <span style='color:#111;'> 433B </span>","children":null,"spread":false},{"title":"recv_main.cpp <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"client_main.cpp <span style='color:#111;'> 11.69KB </span>","children":null,"spread":false},{"title":"server_main.cpp <span style='color:#111;'> 18.77KB </span>","children":null,"spread":false}],"spread":true},{"title":"客户端","children":[{"title":"MyWc6.cpp <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"MyWc6Dlg.cpp <span style='color:#111;'> 5.26KB </span>","children":null,"spread":false},{"title":"MyWc6.clw <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 207B </span>","children":null,"spread":false},{"title":"MyWc6.opt <span style='color:#111;'> 63.50KB </span>","children":null,"spread":false},{"title":"MyWc6Dlg.h <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"MyWc6.plg <span style='color:#111;'> 946B </span>","children":null,"spread":false},{"title":"MyWc6.aps <span style='color:#111;'> 20.88KB </span>","children":null,"spread":false},{"title":"WCSock.cpp <span style='color:#111;'> 954B </span>","children":null,"spread":false},{"title":"MyWc6.h <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"MyWc6.exe <span style='color:#111;'> 112.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 3.48KB </span>","children":null,"spread":false},{"title":"MyWc6.ncb <span style='color:#111;'> 121.00KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"WCSock.h <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"MyWc6.rc <span style='color:#111;'> 6.07KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"MyWc6.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"MyWc6.rc2 <span style='color:#111;'> 397B </span>","children":null,"spread":false}],"spread":false},{"title":"MyWc6.dsp <span style='color:#111;'> 4.16KB </span>","children":null,"spread":false},{"title":"MyWc6.dsw <span style='color:#111;'> 518B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • pavane1056 :
    非常有帮助,但是看不懂代码。
    2013-11-26
  • wubo463836867 :
    可以 还不错哟
    2013-08-12
  • beyondhaikuo :
    很好,很实用
    2013-07-05
  • kllihuang :
    虽然有些简便,但是很实用
    2013-04-25
  • zz13761743 :
    可以,基本明白怎么做了!
    2012-06-29

免责申明

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