-
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
-
udp
实现可靠的UDP封装传输类,可以进行多点传输,采用超时重发机制(Reliable transmission of UDP encapsulation type, can be multi-point transmission, the use of timeout retransmission mechanism)
- 2011-10-15 23:04:12下载
- 积分:1
-
chart
说明: 点对点的聊天工具,公司不让QQ,SKYPE,就动手写了个超小巧的聊天工具(Peer-to-peer chat tool company from QQ, SKYPE, on hand to write a super-compact chat tools)
- 2008-10-06 21:39:06下载
- 积分:1
-
Network-Program-Pro-Code
Windows网络与通信程序设计 源码 (Windows network and communications programming source code)
- 2009-03-23 13:33:41下载
- 积分:1
-
ServerSocket
一个很好的winsock tcp/ucp示例,相信看了肯定收益颇丰(a good example for winsock about tcp/udp)
- 2009-10-31 09:05:50下载
- 积分:1
-
ceshi
实现本地程序从远程服务器下载文件。保存到本地。同时,具备断点续传的功能。可以在下载一部分的情况下,再次下载从断点处继续下载。(Implement a local program to download files a remote server. Saved locally. At the same time, with the functions of HTTP. You can download a part in the case, once again download continue downloading the breakpoint.)
- 2016-10-26 18:07:08下载
- 积分:1
-
testdlg
检测NAT类型的客户端,程序中指定了服务器IP地址,用户可以自行修改(Detect NAT type of the client, the program specifies the server IP address, the user can modify)
- 2013-08-22 10:16:36下载
- 积分:1
-
libcurltest
上传下载源码,支持 断点续传,使用 libcurl(Upload and download the source code, support for HTTP, use libcurl)
- 2014-01-19 00:54:38下载
- 积分:1
-
Client-dotnet
一个用于客户端和服务器端的客户端的简单程序,C#(one for the client and the server-client simple procedure, C#)
- 2013-09-03 12:09:29下载
- 积分:1
-
Network-Engineer-English-Vocabulary
网络工程师英语词汇表网络工程师英语词汇表网络工程师英语词汇表网络工程师英语词汇表(Network Engineer English Vocabulary
Network Engineer English Vocabulary
Network Engineer English Vocabulary
Network Engineer English Vocabulary
)
- 2013-11-04 20:01:04下载
- 积分:1