PubSub is the Microsoft support for azure functions using web sockets. Your other option is to use a web app service rather than azure functions. a simple asp.net core min api is a good replacement for an azure function.
https://video2.skills-academy.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-8.0