我有一个关于在.NET中使用TCPListener的问题...我正在考虑一个客户端/服务器应用程序并且是这种应用程序的新手我在网上搜索了一下,解决方案更常出现的是为每个新客户端连接创建一个新线程。
这个解决方案看起来很好,但我想知道它是否仍然适用于同时拥有数千个客户端的应用程序?
当然,如果有数千个客户端,应用程序将不会托管在小型桌面上,而是托管在真实服务器上,但它是为大量客户端设计应用程序的方式吗?
谢谢你的帮助。
I have a question about the usage of TCPListener in .NET... I am thinking about a client/server application and being new to this kind of application I have search a bit around the web and the solution which come the more often is to create a new thread for each new client connection.
This solution seem fine but I was wondering if it was still usable with a application where you can have thousands of client at the same time ?
Of course if there is thousands of client the application will not be hosted on a small desktop but on a real server, but is it the way to design an application for a large number of client ?
Thank for help.
最满意答案
如果我正在创建一个应用程序(服务器 - 客户端),我的第一个想法总是WCF。 根据经验,我从来没有遇到任何连接客户的问题。
如果您不知道,可以使用以下链接向您介绍。
1) MSDN Windows Communication Foundation是......
2) MSDN Windows Communication Foundation
我刚刚发了一篇关于wcf的帖子,并且有一个服务器的示例设置。 这可能对你有帮助。
- > 如何在启动时初始化服务器?
If i'm making an application (server - client), my first thought is always WCF. From experience i've never had any issues with number of clients connecting.
Here are a few links that might introduce you to it, if you don't know it.
1) MSDN Windows Communication Foundation is...
2) MSDN Windows Communication Foundation
I've made a post a while ago concerning wcf, and there's a sample setup of a server. That might help you.
--> How can i initialise a server on startup?
更多推荐
发布评论