stateblock GlobalNetworkByteCount augments RNetwork {
addstate RNetwork.gBytesSent: int = 0;
addstate RNetwork.gBytesReceived: int = 0;
precode postSend (remote: RNetAddress, nbytes: int) {
gBytesSent += nbytes;
}
precode postReceive (remote: RNetAddress, nbytes: int) {
gBytesReceived += nbytes;
}
}
Naccio Home Page
University of Virginia, Computer Science