I implemented a middleware example regarding the following tutorial: https://radu-matei.com/blog/aspnet-core-websockets-middleware/. I tried to connect via http and websockets and it worked fine.
After that I tried to connect with the tcpclient class to the middleware but was not able to establish a connection.
then I tried it with the tcplistener class like in older .net versions: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.internal.http.tcplistener?view=aspnetcore-1.1&viewFallbackFrom=aspnetcore-2.1.
I implemented a tcplistener in the main method of the application, which is listening on a different port than the middleware. Therefore I have two servers a websocketserver and a tcpserver in the app.
I want avoid the tcp server, which was created with tcplistener and manage the tcpclient connection with the middleware. Is it possible to accept besides the websocket connection a tcpclient connection in a .net core middleware?