When not connected, (1) client hops port numbers (2) server stops sending.

This commit is contained in:
Keith Winstein
2012-08-13 11:19:25 +03:00
parent 56093d2961
commit 89da6105aa
3 changed files with 35 additions and 2 deletions
+6
View File
@@ -91,6 +91,8 @@ namespace Network {
static const int PORT_RANGE_LOW = 60001;
static const int PORT_RANGE_HIGH = 60999;
static const unsigned int ASSOCIATION_TIMEOUT = 20000; /* ms */
static bool try_bind( int socket, uint32_t addr, int port );
int sock;
@@ -112,6 +114,8 @@ namespace Network {
uint64_t saved_timestamp_received_at;
uint64_t expected_receiver_seq;
uint64_t last_heard, last_association;
bool RTT_hit;
double SRTT;
double RTTVAR;
@@ -123,6 +127,8 @@ namespace Network {
Packet new_packet( string &s_payload );
void reset( void );
public:
Connection( const char *desired_ip, const char *desired_port ); /* server */
Connection( const char *key_str, const char *ip, int port ); /* client */