When I write a Java program that talks to an HTTP endpoint/server I would ideally use some library to create my HTTP request using the classes provided by that library and make the call.
I am trying to figure out where exactly does the packet creation happen for each step in the network stack? As in when I use these HTTP libraries are the HTTP packet creation handles by these libraries? Is it them who puts all the HTTP header information and append the data and create the packet?
And then where are the TCP packets assembled? Is it done at the kernel level? Is the created HTTP packet submitted to the kernel network module by the jvm and the kernel wraps the packet with TCP information and so on?
I'm trying to draw a clear picture of where each of these things happens so I could figure out where exactly I want to hack into for a project idea I have.
Thank You
Shabir