Measuring network traffic with Indy
I'm using a TIdTCPCmdServer to handle all communication with client applications. I would like my server to log all kind of stuff including network traffic. Is there any easy or clever way to see how much bytes the TCPCmdServer actually received and sent? I can only think of code like ASender.SendReply; Inc (FTraffic, Sizeof (ASender.NormalReply.Code) + Sizeof (Char) * ASender.NormalReply.Text.Length)); which is extremely ugly in my opinion because these traffic updates would be spreaded out all over my code and are fairly complicated as well. Any suggestions? Thanks for your help. Look into