文件名称:会话通信程序1
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 534kb
- 下载次数:
- 0次
- 提 供 者:
- 小*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
该实例完成一个服务器端和客户端简单的会话通信过程.要求主机上安装TCP/IP协议,并设定IP.服务器端和客户端使用同一台主机的不同端口号,服务器端使用的端口号为2000,客户端使用的端口号为3000. 服务器端程序先运行,首先初始化Winsock,然后创建套接字,在2000端口上进行绑定,接着在2000端口进行侦听,并进入等待状态.客户端后运行,同样首先初始化winsock,然后创建套接字,接着尝试和服务器端的连接.连接一旦建立,就可以在服务器端和客户端之间进行通信.客户端提示输入一个数字,比如输入50,那么客户端会从"data0"到"data49"发送50个字符串,输入0退出.-completed an example of the server and client simple oral communication process. Asked on the mainfr a me installed TCP/IP protocol and set the IP. Servers and clients using the same host of different ports, the use of the server port to 2000, clients use the port number as 3000. server operating procedures first, the first initialization Winsock, and then create socket, in 2000 ports on bonding, then the 2000 port for the interception, and entered the wait state. client after running the same protocols of the first initialization, and then create socket, and then try to server connections. connecting once established, can the server and client communications between. the client suggested the importation of a number, such as the importation of 50, then the client will "data0" to
(系统自动生成,下载前可以参看下载内容)
下载文件列表
会话通信程序1
.............\Client
.............\......\Client.cpp
.............\......\Client.dsp
.............\......\Client.dsw
.............\......\Client.ncb
.............\......\Client.opt
.............\......\Client.plg
.............\......\Debug
.............\readme.txt
.............\Server
.............\......\Debug
.............\......\server.cpp
.............\......\server.dsp
.............\......\server.dsw
.............\......\server.ncb
.............\......\server.opt
.............\......\server.plg
.............\Client
.............\......\Client.cpp
.............\......\Client.dsp
.............\......\Client.dsw
.............\......\Client.ncb
.............\......\Client.opt
.............\......\Client.plg
.............\......\Debug
.............\readme.txt
.............\Server
.............\......\Debug
.............\......\server.cpp
.............\......\server.dsp
.............\......\server.dsw
.............\......\server.ncb
.............\......\server.opt
.............\......\server.plg