具有套接字服务器的多个客户端 [英] Multiple Clients with Socket Server
本文介绍了具有套接字服务器的多个客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用了多个客户端的异步套接字。 private
套接字 serverSocket; //服务器套接字
私人 套接字 [] clientSocket = new 插座 [10000]; 所有响应都是在服务器端收到的,但有更多的延迟&所有回复在服务器端共同收到。
服务器正在公共IP上运行。
如果有可能纠正,请告诉我。
Venkata PrasadK
解决方案
您需要处理套接字的请求托管在一个单独的线程上并将它们交给处理线程。
Joshua Bylotas
http:// www。 ivorymatter.com
Hi, private
I used asynchronous Sockets with Multiple Clients.
Socket serverSocket; //Server Socket
private Socket[] clientSocket = new Socket[10000];
All the reponses are received at sever side but with more delay & all the responses combinely received at server side.
Server is running on Public IP.
Please let me know if there is any possibility to rectify it.
Venkata PrasadK
解决方案
You need to process incomming requests tot he socket host on a seperate thread and hand them off to a processing thread.
Joshua Bylotas
http://www.ivorymatter.com
这篇关于具有套接字服务器的多个客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文