in general a websocket connection is persistent connection rather than a typical http request/response. It is a 2 way stream with no formal packet definition. Part of designing a websocket app is defining the packet structures.
signal/r is a communication library and protocol built on websockets. It implements common HUBs for the server side and supports packet routing. unless your clients are already using signal/r this is not an option.
you can easily code to receive raw messages. You code would replace the echo method:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-9.0
your clients will need to tell you what the packets structure is and any required protocol packets.
as hosting a websocket application requires a persistent connections to multiple clients, and typically there are dedicated resources for each connection, which is active for the life of the connection. so a websocket app ties up more resources than a standard website (which typically have a 90 second connection time limit) thus require a different hosting requirement.
the Azure Web PubSub is an optimized hosting option for websocket applications. but I does not control how the app is developed or tools. it supports .net, node, python, java and azure functions (via hooks).