登录
首页 » Visual C++ » client-server

client-server

于 2016-07-11 发布 文件大小:22144KB
0 380
下载积分: 1 下载次数: 16

代码说明:

  多协议文件传输c/s网络应用设计与实现,程序用 TCP/UDP 两个协议模拟多协议服务器。首先服务器端要将两种协议的套接字创建好,并且监听 TCP 端口的连接。必要时使用select函数来进行多连接处理和非阻塞处理。而客户端直接可以按照发送的地址和端口号来进行通讯。 首先要运行服务器端,服务器会监听 TCP 端口。然后运行客户端,根据事先设定好的 IP和端口,就可以进行连接传输数据了。 程序实现的关键步骤: 以TCP协议为例 服务器端: 1.创建套接字;2.绑定端口;3.进入无穷的循环;4.接收请求;5.处理请求;6.应答。 客户端: 1.找到服务器的IP地址和协议的端口号;2.创建套接字;3.确定连接需要任意的,没有使用的端口号允许TCP去选择一个;4.将套接字和服务器连接;5.使用应用层协议和服务器交互;6.关闭连接。 (Multi-protocol file transfer c/s network application design and implementation of programs simulate multi-protocol server with TCP/UDP both protocols. First socket server to create a good two protocols, TCP port and listens for connections. If necessary, use the function to handle multiple connections and non-blocking treatment. And the client can follow directly address and port number to communicate. First run on the server side, the server listens on TCP port. Then run the client, according to pre-configured IP and port, you can connect the data transmission. The key step program implementation: In TCP protocol as an example Service-Terminal: 1. Create a socket 2 bound port 3 enter an infinite loop 4. receiving a request 5. processing requests 6 response. Clients: 1. Locate the server s IP address and protocol port number 2 creates a socket 3 connections need to determine arbitrary, unused port allows TCP to choose a 4 and the socket server connections 5 using appli)

文件列表:

client
......\client
......\......\client.cpp,3961,2016-06-16
......\......\client.vcxproj,3313,2016-06-16
......\......\client.vcxproj.filters,944,2015-06-14
......\......\client.vcxproj.user,143,2015-06-14
......\......\Debug
......\......\.....\client.Build.CppClean.log,1851,2016-06-16
......\......\.....\client.lastbuildstate,81,2016-06-14
......\......\.....\client.log,1262,2016-06-16
......\......\.....\client.obj,192399,2016-06-16
......\......\.....\client.tlog
......\......\.....\...........\CL.read.1.tlog,29374,2016-06-16
......\......\.....\...........\CL.write.1.tlog,404,2016-06-16
......\......\.....\...........\client.lastbuildstate,160,2016-06-16
......\......\.....\...........\link.read.1.tlog,2674,2016-06-16
......\......\.....\...........\link.write.1.tlog,378,2016-06-16
......\......\.....\vc120.idb,732160,2016-06-16
......\......\.....\vc120.pdb,421888,2016-06-16
......\client.sdf,32768000,2016-06-20
......\client.sln,1815,2015-06-14
......\Debug
......\.....\client.exe,72704,2016-06-16
......\.....\client.ilk,493528,2016-06-16
......\.....\client.pdb,1134592,2016-06-16
......\.....\tcp_udp.exe,74752,2016-06-16
......\.....\tcp_udp.ilk,471476,2016-06-16
......\.....\tcp_udp.pdb,929792,2016-06-16
......\.....\test.exe,73728,2016-06-16
......\.....\test.ilk,434920,2016-06-16
......\.....\test.pdb,954368,2016-06-16
server
......\Debug
......\.....\tcp_udp.exe,74752,2016-06-16
......\.....\tcp_udp.ilk,545528,2016-06-16
......\.....\tcp_udp.pdb,1101824,2016-06-16
......\tcp_udp
......\.......\Debug
......\.......\.....\main.obj,161031,2016-06-16
......\.......\.....\server.obj,197094,2016-06-16
......\.......\.....\tcp_udp.Build.CppClean.log,1013,2016-06-16
......\.......\.....\tcp_udp.lastbuildstate,82,2016-06-14
......\.......\.....\tcp_udp.log,1302,2016-06-16
......\.......\.....\tcp_udp.tlog
......\.......\.....\............\CL.read.1.tlog,58560,2016-06-16
......\.......\.....\............\CL.write.1.tlog,1232,2016-06-16
......\.......\.....\............\link.read.1.tlog,2888,2016-06-16
......\.......\.....\............\link.write.1.tlog,496,2016-06-16
......\.......\.....\............\tcp_udp.lastbuildstate,161,2016-06-16
......\.......\.....\tcp_udp.unsuccessfulbuild,0,2016-06-14
......\.......\.....\vc120.idb,953344,2016-06-16
......\.......\.....\vc120.pdb,430080,2016-06-16
......\.......\main.cpp,244,2016-06-16
......\.......\server.cpp,8944,2016-06-16
......\.......\server.h,886,2016-06-16
......\.......\tcp_udp.vcxproj,3453,2016-06-16
......\.......\tcp_udp.vcxproj.filters,1151,2015-06-14
......\.......\tcp_udp.vcxproj.user,143,2015-06-14
......\tcp_udp.sdf,32636928,2016-06-20
......\tcp_udp.sln,888,2015-06-14

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

发表评论

0 个回复

  • NetWork
    这个是关于网络工作室的源代码,主要是用于网络编程的初级参考,希望能给刚入网络编程的朋友提供帮助(This is a studio on the network)
    2007-09-03 18:27:40下载
    积分:1
  • WSAEventSelect_Test_IO
    关于WSAEventselect模型的使用,这个模型和WSAAsyncselect很相像,但是使用方法还是要注意(About WSAEventselect model used is very similar to the model and WSAAsyncselect, but still have to pay attention to use)
    2010-11-08 17:05:04下载
    积分:1
  • MyPing
    网络延迟测试工具。测试出网络速度带宽,大小( Network latency test)
    2016-05-28 11:02:21下载
    积分:1
  • GetMACAddress
    应用程序向导使用“TODO:” 来指示 应添加或自定义的源代码部分。 如果应用程序在共享 DLL 中使用 MFC,且应用程序使用的语言不是 操作系统的当前语言,则需要从 Microsoft Visual C++ 光盘上 WinSystem 目录下将相应的本地化资源 MFC70XXX.DLL 复制到计算机的 system 或 system32 目录下, 并将其重命名为 MFCLOC.DLL。 (“XXX”代表 语言缩写。 例如,MFC70DEU.DLL 包含翻译成 德语的资源。) 如果不这样做,应用程序的某些 UI 元素 将保留为操作系统的语言。">
    2008-03-20 00:39:18下载
    积分:1
  • winsock
    应用于windows 平台下的vc编程,主要是windows socket 下的网络编程(windows socket programming, including basic knowledge of the single-threaded, multi-threaded. Development and application in the windows platform)
    2012-04-25 11:43:29下载
    积分:1
  • tcp_winsock_controler
    这是VB6.0上MSDN的例子,不过我做了稍微改动,能实现输入任意的IP地址,实现与其通信的目的(This is a VB6.0 example on MSDN, but I make a slight alteration can realize arbitrary input IP address, the realization of the purpose of communication)
    2008-03-30 18:04:56下载
    积分:1
  • klps
    这是一个对打开窗口的位置进行安排调整的程序.可以实现重叠或平铺等功能()
    2018-04-29 12:05:48下载
    积分:1
  • FPGA
    说明:  实现人脸识别,通过硬件FPGA来进行实现(Realize face recognition, realize face recognition by hardware FPGA)
    2020-12-23 10:19:07下载
    积分:1
  • TCPIP
    modbus 测试,用VB的winsock控件实现的modbus tcpip通讯等(modbus test, with VB the winsock control to achieve the modbus tcpip communications)
    2021-04-06 17:59:02下载
    积分:1
  • vlsmaddr
    本源碼是一個用從Internet的Web頁面上得到Email地址,采用多線程遞歸算法(This source code is a Web page is available from the Internet, get Email address, using a recursive algorithm for multi-threaded)
    2009-09-22 17:30:18下载
    积分:1
  • 696516资源总数
  • 106913会员总数
  • 8今日下载