If this is just an academic excercise I would suggest www.ietf.org
so that you can read all about how http protocol needs to be implemented.
If this is something that you need to get something done,
see the first reply.
Otherwise the traffic over the socket will look something
like this.