how to calculate data usage for a http request or for socket created by http connect request.
For each HTTP request/response pair we store the
bytes_out fields (the size of the request and the size of the response). Beaware that these don't include, however, the IP and TCP headers.
You can identify a single connection by the
(client_ip, client_port, ip, port) combination.