Warn on out-of-order or duplicated packets (or missing nonce increment!)

This commit is contained in:
Keith Winstein
2012-05-23 18:08:31 -04:00
parent 0b5a643964
commit 682bbdfebd
4 changed files with 30 additions and 5 deletions
+9 -1
View File
@@ -102,11 +102,14 @@ namespace Network {
double SRTT;
double RTTVAR;
/* Exception from send(), to be delivered if the frontend asks for it,
/* Exception from send() or recv(), to be delivered if the frontend asks for it,
without altering control flow. */
bool have_send_exception;
NetworkException send_exception;
bool have_recv_exception;
NetworkException recv_exception;
Packet new_packet( string &s_payload );
public:
@@ -132,6 +135,11 @@ namespace Network {
{
return have_send_exception ? &send_exception : NULL;
}
const NetworkException *get_recv_exception( void ) const
{
return have_recv_exception ? &recv_exception : NULL;
}
};
}