Reminds me of TSR (terminate and stay resident) programs, which felt like magic (I was happy to implement one a long time ago). TSR is an embryo of that in a way!
This brought back memories of school when some of us cheated on programming exercises by calling up a TSR program with solutions when the teacher was out of sight. Good times.
I've been looking for TSR & Packet driver coding examples and resources (for a non-keyboard triggered use case). I want to implement a localhost only webserver as either a TSR or Packet Driver.
Have you taken a look at mTCP[0]? There would be some good example code there. The TSR portion wouldn't be included in the mTCP code, but there is definitely code there for a webserver.
I have and that's the thing. Every webserver I'm aware of runs in the foreground unlike TSRs and PacketDrivers. I'm looking for a webserver that runs in the background.