Do .NET 4.5 Server-Side WebSockets use IOCP?

白昼怎懂夜的黑 提交于 2020-01-06 18:11:26

问题


Does anyone know if AspNetWebSocket (introduced in .NET Framework 4.5) utilizes IOCP for handling requests instead of one thread per Connection?


回答1:


There's a relatively easy way for you to work this out for yourself.

  • Create a simple program.
  • Watch it with a task monitor and look at the number of threads.
  • Create lots of web socket connections to it.
  • See if the thread count increases whilst the connections are alive.
  • Compare the number of connections to the number of threads.

But, what does it matter? As long as the API meets your performance and scalability requirements which you will only discover from performance testing your application.

Note that I would be VERY surprised if the implementation does NOT use IOCP but there's really little point in asking IMHO.



来源:https://stackoverflow.com/questions/16105821/do-net-4-5-server-side-websockets-use-iocp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!