登录
首页 » 套接字网络编程 » completed an example of the server and client simple oral communication process....

completed an example of the server and client simple oral communication process....

于 2022-01-26 发布 文件大小:16.53 kB
0 122
下载积分: 2 下载次数: 1

代码说明:

该实例完成一个服务器端和客户端简单的会话通信过程.要求主机上安装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 mainframe 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 import

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论


0 个回复

  • 非常简单的代码就可以实现下载远文件到本地了
    非常简单的代码就可以实现下载远程文件到本地了 -A very simple code that can be achieved to download a remote file to a local of the
    2022-05-10 21:58:45下载
    积分:1
  • 通过串口进行通信
    通过串口进行通信-through serial communication
    2022-01-26 02:21:12下载
    积分:1
  • Network traffic can be restricted to things that can use this to simulate the In...
    可以限制网络流量的东西 可以用这个来模拟Internet 速度控制 实现局域网的Internet-Network traffic can be restricted to things that can use this to simulate the Internet speed control to achieve LAN Internet
    2022-05-25 11:53:01下载
    积分:1
  • 可监控流量、WEB等内容,是一很好用的局域监控软件
    可监控流量、WEB等内容,是一套很好用的局域网监控软件-good
    2022-08-14 07:21:14下载
    积分:1
  • 本人大二数据库实习作品,班级学生信息与成绩管理,典型的ASP+SQL2000的应用...
    本人大二数据库实习作品,班级学生信息与成绩管理,典型的ASP+SQL2000的应用-internship database entries, class information and performance management, the typical application of ASP SQL2000
    2022-01-28 08:42:32下载
    积分:1
  • 串口通信及虚拟串口创建
    资源描述WINDOWS下TCP、UDP作为客户端或服务进行报文测试,RS232串口报文测试,虚拟串口创建
    2022-04-07 08:33:51下载
    积分:1
  • this upload sample
    this upload sample-this upload sample................
    2022-04-13 07:54:17下载
    积分:1
  • 客户端服务器
    单独编译服务器和客户端程序。编译更改IP地址在这两个方案,以满足您的机器前(注:从Windows NT / 2000 M / C的命令提示符下让你的IP地址,运行“IPCONFIG”)当服务器程序运行时,它会显示在哪些IP正在运行,端口是听。现在运行客户端程序运行,以便建立与服务器的连接。当建立连接的服务器将显示从那里它已经接受的连接和客户端会要求这是要被发送到服务器的字符串的IP地址和端口。上的字符串将显示它的收据的服务器,发送将被客户端:收到的确认。客户既可以在同一台机器上运行的服务器或从不同的机器。如果从不同的机器上运行,那么网络连接应在机器之间存在运行在服务器和客户端程序
    2023-06-28 15:50:04下载
    积分:1
  • E
    一个电子邮件收发的程序,时我这学期的课程设计作业-an e-mail procedures, I am of course this semester design operations
    2022-05-24 19:45:57下载
    积分:1
  • 路由跟踪的源
    路由跟踪的源程序 - The route tracks source program
    2022-03-22 23:04:56下载
    积分:1
  • 696518资源总数
  • 104744会员总数
  • 33今日下载