Simple answer: you cannot do that. Azure Functions are Event-based (such as an HTTP call). If you need to provide TCP socket, maybe hosting your python code in a container, e.g. Azure Container Instances, might be a good way to go.
I have built a Socket TCP / IP server that listens on a specific port and then, with that data, makes a rest query to another server, and that response is returned through the port where it received it.
All Socket server is made in Python 3.8 and works great.
I need to know how to implement this code from my Socket server to an Azure Functions, so that it provides permanent service?
I appreciate the goodwill of anyone who can offer an answer.
Thanks Total.
How to implement a python code to work as Azure Function?