dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.15k stars 9.92k forks source link

Kestrel as a TCP server only #56790

Closed edwinloubser closed 1 month ago

edwinloubser commented 1 month ago

Just some background, we integrate with a lot of iot devices, predominantly using UDP and TCP. I'm investigating updating our own custo SocketAsyncEventArgs based servers which is getting a bit long in the tooth now. With regards to TCP, I want to do a POC using Kestrel. I'm aware of https://github.com/davidfowl/MultiProtocolAspNetCore on how to achieve this.

Is there any other documentation available? Is this still the best implementation considering the feature churn since that sample was created?

amcasey commented 1 month ago

Wow, that sample's pretty old. I think it was actually a proof of concept for the changes that were eventually made. Having said that, I think the current answer is still ConnectionHandler and that the SignalR implementation might serve as a useful example.

amcasey commented 1 month ago

Here's a more recent sample: https://github.com/StackExchange/StackExchange.Redis/blob/main/toys/KestrelRedisServer/Program.cs

edwinloubser commented 1 month ago

Thanks, I will take a look at both examples. Should I close this?

amcasey commented 1 month ago

If you're happy, I'm happy. 😄

edwinloubser commented 1 month ago

Yes thanks, I appreciate the help.