Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

compile c++ via http on port 80

Can we compile c++ programs via http on port 80. As my computer at work, where most of the ports are closed for security...Is it possible to compile c++ on port 80 via a network...
[180 byte] By [rnekkent] at [2007-11-11 7:25:03]
# 1 Re: compile c++ via http on port 80
Do you mean trasferring the source files via port 80 to the compiler or simply writing an app that accesses this port? The answer to the latter is a definite yes, but that doesn't mean that the program will work. It depends on the network settings of the computer, which has very little to do with C++. You simply have to contact the sys admin or modify the firewall's settings so that it allows specific programs to access this port.
Danny at 2007-11-11 21:02:20 >
# 2 Re: compile c++ via http on port 80
I mean trasferring the source files via port 80 to the compiler and compileing..and getting the results in a web browser or in a text file...
rnekkent at 2007-11-11 21:03:21 >
# 3 Re: compile c++ via http on port 80
which results exactly? the compilation errors/diagnostics or actually running the program and directing its output to the browser? The latter is problematic because you need a linker, in addition to the compiler and the security risks are quite enormous. Comeau has a similar service of online compilation but without linkage. http://www.comeaucomputing.com/tryitout/
In general, there's nothing special about reading a source file from port 80 and passing it to a compiler. You need to use HTTP and perhaps CGI or a more fashionable technology but remember that C++ is not a scirpting language so you can't just run C++ code directly: you need to read the source file, store it locally, invoke the compiler, then the linker, and finally have the browser run the executable.
Danny at 2007-11-11 21:04:19 >