mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-07 11:46:34 +01:00
add file sender timeouts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user