remote execute program
Cecil Ward
d at cecilward.com
Fri Mar 23 19:25:59 UTC 2018
On Friday, 23 March 2018 at 01:23:56 UTC, Cecil Ward wrote:
> I am wanting to write a short program (on a ‘server’ you could
> say) that takes a command, runs it (as on the command line, so
> an executable with arguments or a shell command) and returns a
> 3-tuple with an int for the return code, plus the textual
> outputs that it generates to stdout and stderr. I can see a
> number of suitable routines in the D runtime libraries, which
> are already D-ified to save me a some trouble mindlessly
> converting code from C.
>
> Where I could do with some help is as follows: I'm needing to
> send the commands to a remote box using http has to be used
> because the local-end program (on an iPad) that I have to
> interfacing to can only speak http/https, and can not handle
> just a straight eg TCP connection. Despite the overheads from
> using http, if I can employ gzip compression on the link then
> that will be a big gain.
>
> Could anyone give me some general pointers for where to look?
>
> The server box is a linux machine. I'm a very experienced
> professional C programmer but amazingly have never done
> anything with *nix in general or http-related C libraries.
>
>
> I asked a question in this forum earlier about general
> low-level networking, but now this requirement has come up that
> mandates the use of very simple http and needs only synchronous
> operations. The impressive framework that is vibe.d has already
> been mentioned, but the amount of reading matter is rather
> daunting.
>
> A simple D example of an http transaction would be very helpful.
It's not really a D question, in a sense, it's just that I am out
of my depth. And wrapping fat C libraries, particularly
converting .h files is something that I don't have any experience
of, so something ready-cooked in D would b good.
What library routines are available - or do I have to start
wading through the vastness of vibe.d?
More information about the Digitalmars-d-learn
mailing list