0
votes

I have a server that use TCP sockets, to get number of bytes that sent/received in this socket I can count number of bytes that sent or received using that specific socket but if I use functions like TransmitPackets, then I can't get number of bytes that sent/received through that specific socket. Is there any way that I can get this information from the socket?

1
Do you use hooks or LSP to get the transmitted bytes?dvasanth
Sorry I don't get what you mean, but I want to get number of bytes that send through a socket that currently is sending data using TransmitPackets Windows API. And currently my only approach is avoiding TransmitPackets because I can't get this information without a low level programming like in WireShark.BigBoss

1 Answers

0
votes

You can use the iphlpapi functions to get the active TCP connections statistics. Use the API GetExtendedTcpTable to get informations on all active connections including bytes sent/received, processid & TCP tuple.