ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello there, uhhmmm...anyone here could give me an idea or point me a reference on how web server application are created (console based) using c++ and linux as it's environment...i'd be using threading, processes, synchronization and http protocol...
a reference to any website or books would be nice...thank you...
You will have to use CGI programming for the purpose.
Here's a link for cgi programming using C: http://www.openroad.org/cgihelp/cgi.html
Other rules regarding CGI programming will apply.
Perl, PHP or Python can be a good idea for webserver programming. Perl can help you with threading, processes, synchronization and http protocol. It is definitely a very versatile and strong programming language both for command line and for web programming.
Last edited by milindlokde; 05-19-2007 at 01:40 AM.
It is a well known suite of tutorials, and it's quite friendly. But I suggest you also read "Linux Socket Programming By Example" , or "Beginning Linux Programming", or "Linux Programming Unleashed". These are commercial and, although you can find them on emule or whatever, you ought to buy them (really, the printed version of such a book is great!). And there is also a free ebook, "Advanced Linux Programming" and it's quite good. Hope this helps, cheers.
Just another suggestion. I once looked into "ptypes". It's a C++ library like STL but it adds a lot of stuff that would be hard to write portable so it works on different platforms. Like how do you do portable multitread locking and networking with STL? (I have no idea)
If you are looking for a small HTTP server that you can embed into your own application, then there are already a few of these out there. For one, go to http://www.acme.com/software/thttpd/. There are more links from there.
If you want to develop a server from the ground up, get yourself an HTTP (not HTML) reference, such as http://www.w3.org/Protocols/HTTP/HTTP2.html. Also get netcat, if you don't already have it, and use it to see what a browser sends to a server. Use the information at Beej's guide, from above, to start writng code that responds to the requests of a browser. You can easily have an embedded server that performs basic functionality in a couple of hundred lines of code. Probably less.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.