Runs on a raspberry pi or some other device that can just stay on or whatever
Runs on the machine you want to sleep and puts it to sleep whenever it get's a request on that port
probs add some authentication before people work out how to put my PC to sleep whenever they want tbh