1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 08:26:45 +02:00

add file sender timeouts

This commit is contained in:
Jfreegman
2013-11-14 19:14:54 -05:00
parent be88c89e09
commit ee509a7cec
7 changed files with 57 additions and 26 deletions

View File

@ -100,3 +100,9 @@ char *wc_to_char(wchar_t ch)
return ret;
}
/* Returns true if connection has timed out, false otherwise */
bool timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout)
{
return timestamp + timeout <= curtime;
}