I\'m currently working on a Computer Science degree, and I want to build my own
ID: 654917 • Letter: I
Question
I'm currently working on a Computer Science degree, and I want to build my own Web Server library. The problem? Every search I've done on interacting with web sites points to "Use this library that was built by someone else" - instead of explaining the basics of sending and receiving information.
I'm not asking for a lot - I just want to enter a single alpha-numeric character on a web page, hit a button, and have that one byte of information sent to a C++ program, without the aid of a non-standard library.
Explanation / Answer
It's really the most basic portable asynchronous communication system you will find using modern C++, as it abstract away other socket libraries or platform provided ones.
All the modern C++ http networking libraries (CppNetlib and CPPCMS) relies on it. I suggest you build your library around it provide basics for sockets and asynchronous (and synchronous) comunication but don't setup a full system for you. Maybe in a few years you can even replace Boost.ASIO by the C++ standard equivalent.
Also, the documentation of Boost.Asio provide insight on how communication works in this kind of context. So reading it might answer a lot of your questions.
And if you want to understand the lower level, read the Asio code. It's a bit hard to read if you're not used to C++ meta-programming and other C++ idioms but you would learn a lot by reading it.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.