将TCP客户端服务器转换为UDP

将TCP客户端服务器转换为UDP

本文介绍了将TCP客户端服务器转换为UDP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我有一个TCP/IP多线程服务器/client应用程序.我想将其转换为UDP协议以测试性能问题.

我有一个问题:
正如我在UDP服务器上发现的那样,我有一个使用sendto和recivefrom发送和接收数据的套接字,但是在TCP/ip上,您有一个侦听套接字,并且每个连接的客户端都有自己的套接字.如何使用UDP协议执行此操作?换句话说,如何在UDP中进行多线程处理,只有一个服务器套接字可以接收数据,并且可以说接受连接.在发送数据时,我还可以为每个客户端套接字创建数据吗?就像在TCP/IP中一样?

Hello all.
I have a TCP/IP multithreading server /client application. i want to convert it to UDP protocol for testing performance issues.

I have a question :
As i found on UDP server i have one socket that send and recive data by using sendto and recivefrom but on TCP/ip you have a listening socket and each client connected has its own socket. how to do this using UDP protocol ? on other words how to make multithreading in UDP and only we have one server socket that recive data and as we can say accept connections .Also in sending data can i make for each client socket ? as in TCP /IP?

推荐答案


这篇关于将TCP客户端服务器转换为UDP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 21:52