7 * This modules defines functions used to keep track of adaptive
8 * timeouts. You can use these functions to (for example) keep track of
9 * how long you should wait to receive a packet from a remote host.
19 * We reserve timeouts for receive and send packets, connection time and
20 * we leave space for 3 user definable timeouts.
22 typedef enum {RECV, SEND, CONN, USER1, USER2, USER3} timeoutTypes;
23 #define TIMEOUT_TYPES_NUMBER 6
26 * Sets the bounds on a specific class of timeouts.
29 SetDefaultTimeout(timeoutTypes type, double min, double max);
32 * get the current defaults timeouts
35 GetDefaultTimeout(timeoutTypes type, double *min, double *max);
39 * Returns the current timeouts value for the specific class given the
40 * IPAddress and the #size# of the data to be sent/received. If #size# is
41 * <= 0 it will be ignored.
44 GetTimeOut(timeoutTypes type, IPAddress addr, long size);
47 * Reports how long it took to perform the action (say send or receive a
48 * packet) last time and if it timed out and how many bytes were
49 * sent/received (if applicable).
52 SetTimeOut(timeoutTypes type, IPAddress addr, double duration, long size, int timedOut);
59 #endif /* TIMEOUTS_H */