|
tcpdump , ethereal , not worthy ? multithreaded aplication ?
if you wanna measure/count how many bytes does a client receive ( on the server side ) , you can easily implement a contor , for receive bytes.suposing that all byte's receive by one client are send by the server , it's easy to make something like :
code:
send(j,da,sizeof(da), 0);
let's say da is the string passed to the client ( a client j ).you incremenent a contor so measure how many bytes are transfered to the client.
let's say i send 4 bytes to the client ( once ) and then 3 .. i can do this.
code:
int j;
int trafic=0; /* start 0 bytes transfered to client j */
nbytes=send(da,sizeof(da),0);
trafic=trafic+nbytes;
so if all trafic to a specified client , is send by the server to that client , you can easily count how many bytes , are received by the client j .
|