5
mud.c
5
mud.c
@@ -502,9 +502,12 @@ mud_cmp_addr(struct sockaddr_storage *a, struct sockaddr_storage *b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned long
|
unsigned long
|
||||||
mud_get_sync_elapsed_msec(struct mud *mud)
|
mud_sync(struct mud *mud)
|
||||||
{
|
{
|
||||||
const uint64_t last = mud->last_recv_time;
|
const uint64_t last = mud->last_recv_time;
|
||||||
|
|
||||||
|
mud_send(mud, NULL, 0, 0);
|
||||||
|
|
||||||
return last ? MUD_TIME_MASK(mud_now() - last) / MUD_ONE_MSEC : ~0UL;
|
return last ? MUD_TIME_MASK(mud_now() - last) / MUD_ONE_MSEC : ~0UL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
mud.h
2
mud.h
@@ -70,7 +70,7 @@ int mud_get_key (struct mud *, unsigned char *, size_t *);
|
|||||||
void mud_set_mtu (struct mud *, size_t);
|
void mud_set_mtu (struct mud *, size_t);
|
||||||
size_t mud_get_mtu (struct mud *);
|
size_t mud_get_mtu (struct mud *);
|
||||||
|
|
||||||
unsigned long mud_get_sync_elapsed_msec (struct mud *);
|
unsigned long mud_sync (struct mud *);
|
||||||
|
|
||||||
int mud_set_send_timeout (struct mud *, unsigned long);
|
int mud_set_send_timeout (struct mud *, unsigned long);
|
||||||
int mud_set_time_tolerance (struct mud *, unsigned long);
|
int mud_set_time_tolerance (struct mud *, unsigned long);
|
||||||
|
|||||||
Reference in New Issue
Block a user