![]() |
|
[Python] Creating a server that speaks to clients? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Creating a server that speaks to clients? (/showthread.php?tid=5664318) |
Creating a server that speaks to clients? - PGTips - Jul 7, 2017 I want to install a program onto 4 computers that just listens for a command by 1 main server. How would I go about doing that? Should I install 4 servers on each PC and my main client program speaks to all of them? Or Should I create a client where its just listening for calls from the server (seems more logical). If so, how would I go about doing this? What I have so far: client.py Code # a simple client socketServer.py Code # a simple server socket* - Davian - Jul 7, 2017 Server: PHP Code PHP Code * - nizarnizario - Jul 9, 2017 Why don't u install Apache or Nginx in the server, and host a file that commands the clients, it's easier to deal with , you'll just need to learn some web programming language like PHP or Python (Django/Flask/Bottle...)... * - PGTips - Jul 13, 2017 (Jul 7, 2017 06:32 PM)davian Wrote: Server: Bloody brilliant, I do have 1 question though. How do I make it so that clients (if the server is up) attempts to connect to them again after X amount of time? Sometimes the client.py will connect and after 10 minutes it will disconnect, I need them to try to connect all the time if that makes sense? * - HailPinkFloyd - Jul 13, 2017 I love how you said "bloody brilliant" lmao * - Davian - Jul 13, 2017 (Jul 13, 2017 09:53 AM)PGTips Wrote: Bloody brilliant, I do have 1 question though.Just wrap client.py with while True 🤝 PHP Code |