Im trying to build a python application that will be run on a specific port so that when i try to connect on that port the python application will be run.
Im guessing i have to do that with socket library but im not very sure about that.
1 Answer 1
On Linux you can do this with xinetd. You edit /etc/services to give a name to your port, then add a line to /etc/xinetd.conf to run your server when someone connects to that service. The TCP connection will be provide to the Python script as its standard input and output.
answered Oct 20, 2017 at 0:13
Barmar
789k57 gold badges555 silver badges669 bronze badges
Sign up to request clarification or add additional context in comments.
2 Comments
Dixon Lew
yeah im actually using linux on virtualbox so i think this could help me THANKS
Blorgbeard
Hey, that's neat!
lang-py
xinetdand similar super-servers.