CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Internet/网络编程

文件名称:client-server

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2016-07-11
  • 文件大小:
    21.62mb
  • 已下载:
    1次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

多协议文件传输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/
client/client.opensdf
client/client.sdf
client/client.sln
client/client.suo
client/client.v12.suo
client/client/client.cpp
client/client/client.vcxproj
client/client/client.vcxproj.filters
client/client/client.vcxproj.user
client/client/Debug/
client/client/Debug/client.Build.CppClean.log
client/client/Debug/client.lastbuildstate
client/client/Debug/client.log
client/client/Debug/client.obj
client/client/Debug/client.tlog/
client/client/Debug/client.tlog/cl.command.1.tlog
client/client/Debug/client.tlog/CL.read.1.tlog
client/client/Debug/client.tlog/CL.write.1.tlog
client/client/Debug/client.tlog/client.lastbuildstate
client/client/Debug/client.tlog/link.command.1.tlog
client/client/Debug/client.tlog/link.read.1.tlog
client/client/Debug/client.tlog/link.write.1.tlog
client/client/Debug/vc120.idb
client/client/Debug/vc120.pdb
client/Debug/
client/Debug/client.exe
client/Debug/client.ilk
client/Debug/client.pdb
client/Debug/tcp_udp.exe
client/Debug/tcp_udp.ilk
client/Debug/tcp_udp.pdb
client/Debug/test.exe
client/Debug/test.ilk
client/Debug/test.pdb
server/
server/Debug/
server/Debug/tcp_udp.exe
server/Debug/tcp_udp.ilk
server/Debug/tcp_udp.pdb
server/tcp_udp/
server/tcp_udp.opensdf
server/tcp_udp.sdf
server/tcp_udp.sln
server/tcp_udp.suo
server/tcp_udp.v12.suo
server/tcp_udp/Debug/
server/tcp_udp/Debug/main.obj
server/tcp_udp/Debug/server.obj
server/tcp_udp/Debug/tcp_udp.Build.CppClean.log
server/tcp_udp/Debug/tcp_udp.lastbuildstate
server/tcp_udp/Debug/tcp_udp.log
server/tcp_udp/Debug/tcp_udp.tlog/
server/tcp_udp/Debug/tcp_udp.tlog/cl.command.1.tlog
server/tcp_udp/Debug/tcp_udp.tlog/CL.read.1.tlog
server/tcp_udp/Debug/tcp_udp.tlog/CL.write.1.tlog
server/tcp_udp/Debug/tcp_udp.tlog/link.command.1.tlog
server/tcp_udp/Debug/tcp_udp.tlog/link.read.1.tlog
server/tcp_udp/Debug/tcp_udp.tlog/link.write.1.tlog
server/tcp_udp/Debug/tcp_udp.tlog/tcp_udp.lastbuildstate
server/tcp_udp/Debug/tcp_udp.unsuccessfulbuild
server/tcp_udp/Debug/vc120.idb
server/tcp_udp/Debug/vc120.pdb
server/tcp_udp/main.cpp
server/tcp_udp/server.cpp
server/tcp_udp/server.h
server/tcp_udp/tcp_udp.vcxproj
server/tcp_udp/tcp_udp.vcxproj.filters
server/tcp_udp/tcp_udp.vcxproj.user

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com