When not connected, (1) client hops port numbers (2) server stops sending.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user