-
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
-
bstv
一个用vc++编写的广播网ip数据包接收的程序,可以实现Access数据库管理,播放下载的节目。(a vc++ program can receive broadcast ip package ,and manage Access database
,and play program that was downloaded)
- 2009-05-16 03:08:15下载
- 积分:1
-
udp
用VC++编写一个简单的基于UDP通信实例!实现了客户端与服务器端的通信源代码!(Using VC++ to write a simple UDP based communication instance! To achieve the client and server-side communication source code!
)
- 2010-05-29 05:49:41下载
- 积分:1
-
socket
基于socket与数据库的自动贩货机服务器端和客户端的编程(Socket and the database automatically based on trafficking in goods and client-server programming)
- 2011-05-16 15:45:31下载
- 积分:1
-
sound
求一段音频信号的短时过零率,可用于特征的选取,以及对音频进行分类筛选等场合。(For the sound process)
- 2018-03-23 14:14:44下载
- 积分:1
-
rac
实现网络抓包功能的基本原理与抓包实现方法,是个不错的提示(for sniffer)
- 2010-09-25 09:53:48下载
- 积分:1
-
kdcxcs2
快递发送单查询通信, 利用了socket(Courier to send single query communication using a socket)
- 2013-01-04 19:39:10下载
- 积分:1
-
HTTPClient
自己写的一个http 客户端源代码,供大家学习参考。(http client source code for all to learn)
- 2013-02-24 10:48:31下载
- 积分:1
-
network-advanced-programing
学网络高级编程不可多得的好书,讲得很详细(High school network programming rare books, very detailed)
- 2011-10-22 09:39:22下载
- 积分:1
-
Catch
屏幕广播,在局域网内同段IP内进行屏幕广播和监控(Catch Computer desk)
- 2013-11-08 09:23:45下载
- 积分:1