
Launch a header-only C++ networking library with HTTP and WebSocket clients and servers using Boost.Beast. Establish a cross-platform Windows and Linux repository with tests and a readme.
Organize a Visual Studio solution by creating an HTTP server project, a separate HTTP client, and a shared common library, then set up folders, rename, and adjust build targets.
Learn the Boost.Asio basics: the IO context centers task execution, post and run, and how threads, work objects, and strands coordinate asynchronous tasks, with timers as convenient utilities.
Learn to implement a robust async connect with boost.asio by parameterizing connect, resolving multiple endpoints, handling errors, and preparing for chaining to send async, while managing memory lifetimes.
Implement a stream-based http response header parser by buffering incoming data, waiting for the double CRLF, and parsing the header data once found.
Parse http header lines by extracting header field name and value, trimming spaces, handling empty lines, and adding to the http header vector for the response.
Prepare an OpenSSL SSL context for the http client by integrating boost.asio, enabling optional https, certificate verification, and TLS configuration with TLS 1.3.
Good software developers invest considerable time into learning. Learning programming languages, techniques, getting the basics, and having a clear theoretical knowledge is a starting point and is definitely necessary. Though, what comes next is often even more valuable. Unfortunately, many times it is ignored.
“Gaining real-life experience while developing something actually useful and doing it together with someone who knows what s/he is doing”.
Doing homework, reading, or writing code snippets have their own merits, but some things can only be learned through experience. It is through this valuable experience that you actually internalize what you have been learning. You learn what to do and what not to do, when and where.
The very first steps of human improvement involve imitation of successful behavior. Many of us who are lucky enough to have a senior developer that we can observe at work, have already somewhat understood this fact. For the rest of us who does not have a relevant senior developer close to us, or for those of us who still feels lacking experience about certain subjects, this course is for you.
In “Code Together” series you will actively observe a senior developing a practically useful piece of software. We will
- prepare a minimal work definition
- write samples
- design an API
- do the implementation
together with you. You are advised to actively follow the work being done
- by listening/watching carefully
- by stopping the videos and writing/replicating the code yourself
or even redesigning things where you see appropriate.
The code we show in this lecture is available as an opensource project on github.
In this episode we will be developing a client and a server with http(s) support.
By the end of this course, you will have experience on
- how to implement
o http clients
o API definitions
o sample apps
- how to use boost asio
- how to implement proper lock-safe multitasking. (i.e. using minimal number of locks or no locks at all)
Above all, you will accumulate useful experience about how a seasoned developer thinks and approaches things.