Home > Net > ASP. NET Core how to create multiple WebSocket connection?
ASP. NET Core how to create multiple WebSocket connection?
Time:01-01
Recently started using ASP. NET Core, Need to create a three WebSocket connections on the server, Or called need three different channel of the attachment to the difference between different sources,
Reference for making many Internet resources is as follows: https://gitee.com/ikende/BeetleX (this seems to be not built with native Kestrel WebServer, don't know can like middleware into pipeline) https://www.google.com.tw/amp/s/codingnote.cc/zh-tw/p/124183/amp/really seldom useful ASP. NET Core (pipeline) to establish a multi-channel WebSocket example,
At present mainly refer to the following article set up? https://radu-matei.com/blog/aspnet-core-websockets-middleware/
But only support multi-channel, don't know will simply write performance is very poor, Version would like to invite friends to recommend high concurrency and support channel open source or provide more design of multi-channel, thanks:)
CodePudding user response:
?? Normally we do not choose three, we will only write routing, write the hub, message processing
I'm too lazy to find information to search a https://blog.csdn.net/sD7O95O/article/details/94415540
Ps: you knew about the channel, but also care about the original is a few? If I visit is ws://XXXXXXXX/channel1 do you think?
CodePudding user response:
As for performance, basically I can only say "watch less blog garden" -- -- -- -- -- -- -- to see, the more the more you can't write code
The current blog garden already compromised by other languages? According to, because is the wave of killings, all day long string to drop performance, let blog garden neter nausea, let themselves within the volume, the real neter still need to respect the reality, with less "attack" -- -- -- -- -- -- -- -- those who write killings, to not attack, it is because they don't respect their actual, now that don't respect the actual, must deliberately flying dun land, then dashed is normal
CodePudding user response:
See article essence logic
You https://radu-matei.com/blog/aspnet-core-websockets-middleware/ Itself said App. MapWebSocketManager ("/ws ", serviceProvider. GetService ());
So we say, since have/ws can have/ws1,/ws2
Now that have NotificationsMessageHandler can have NotificationsMessageHandler 1, NotificationsMessageHandler 2
So want to understand the somebody else than attack to all day with the garden, and the string to be meaningful