property NetConnectionMaxReceiveAmount (maxBytes: int) {
// Limit total data sent through each connection.
requires IndividualNetworkByteCount;
check RNetConnection.preReceive (nbytes: int) {
if (bytesReceived + nbytes > maxBytes) {
violation
("Maximum per-connection receive data amount exceeded for connection " +
toString () + ". Maximum of " + maxBytes +
" bytes per connection. Already received " +
bytesReceived + ". About to receive " +
nbytes + " bytes.");
}
}
}
Naccio Home Page
University of Virginia, Computer Science