-
client-server
多协议文件传输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)
- 2016-07-11 10:19:07下载
- 积分:1
-
107215780netmapper
说明: 网络拓扑图生成工具,可以很轻松的生成整个网络的拓扑图(Network topology generation tool that can easily generate the whole network topology)
- 2008-11-11 23:25:48下载
- 积分:1
-
DevSearch
1.局域网内设备IP搜索
2.发送广播包出去,同时启动侦听接收
3.支持局域网内跨网断搜索(1.IP search in local network
2.send broadcast packet, and receive request
3.support different gateway.)
- 2015-08-19 11:58:11下载
- 积分:1
-
CSocket-TCP
说明: 基于CSocket的TCP多人聊天程序 平常自己练习用的!(CSocket of TCP-based chat program over usual practice their own use!)
- 2010-04-05 09:24:58下载
- 积分:1
-
ping
一个基于VC6.0 的简单ping程序 用于学习简单的网络编程(A the VC6.0 simple ping program for learning network programming)
- 2012-06-16 19:33:12下载
- 积分:1
-
routing_aodv
aodv源代码,RREP路由回复,RREQ路由请求,RRER路由错误的编写,以及aodv中没有字段中每个参数的描述,以及函数的实现,数据发送的处理和数据接收的处理(aodv,RREP,RRER protocol ,RREQ)
- 2012-01-10 19:09:51下载
- 积分:1
-
SCI新
串口通讯,能显示串口数据发送,接受,内带详细代码(Serial communication, serial data can be displayed to send, accept, with detailed code)
- 2018-06-06 16:37:22下载
- 积分:1
-
IOCP-Basic
IOCP基本原理介绍,主要介绍了如何使用IOCP进行开发。(Introduce the basic principles of IOCP, mainly on how to use IOCP for development.)
- 2011-04-20 10:13:01下载
- 积分:1
-
winsock5
说明: 本人毕业时班里集体做局域网聊天工具,当时我一共收集了6个,这是第五个(I graduated class of collective LAN chat tools to do when I collected a total of 6, this is the fifth)
- 2008-09-26 21:49:40下载
- 积分:1
-
POP3
核心实例 POP3上电子邮件的检查,POP3协议,网络编程(POP3 email check)
- 2010-11-11 13:50:50下载
- 积分:1