Modifications pour faire le message toutes les 20 secondes
This commit is contained in:
parent
2b9e67e627
commit
f625058a3c
@ -53,6 +53,8 @@ void work_with_tlvs(struct tlvs_list receivied_tlvs){
|
||||
|
||||
int main(int argc, char const *argv[]) {
|
||||
|
||||
while(CONTINUE){
|
||||
|
||||
// We create the neighbourhood table
|
||||
// We create the message table
|
||||
// We create our own message.
|
||||
@ -70,7 +72,8 @@ int main(int argc, char const *argv[]) {
|
||||
// We then look at the differents TLVs in the packet.
|
||||
work_with_tlvs();
|
||||
|
||||
|
||||
time_t delay = time(NULL) + 20;
|
||||
while(! (delay < time(NULL)){
|
||||
// Theses functions are there for general book-keeping,and run in there own
|
||||
// thread, being run every 20 seconds.
|
||||
// Every 20 sec, if we have less than 5 neighbours, we ask for more peers
|
||||
@ -81,5 +84,7 @@ int main(int argc, char const *argv[]) {
|
||||
t_update_neighbours();
|
||||
// We send out a TLV Network hash to get an ideal of the network state.
|
||||
t_get_network_state();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user