tfTeldUserIdleTimeoutHandle
Table of Contents >> Application Reference >> Telnet Daemon
| #include <trsocket.h> |
| int tfTeldUserIdleTimeoutHandle | ( |
| ttUserTeldSrvHandle userSrvHandle, | |
| ttUser32Bit timeout | |
| ); |
Function Description
This function allows the user to set the interval (in seconds) at which a Telnet server will ping its idle connections by sending a Telnet Are-You-There (AYT) signal. If a Telnet client does not respond appropriately, it will be disconnected. The value specified for timeout must be larger than TM_TELD_MIN_IDLE_TIMEOUT (300 seconds, or 5 minutes by default). You can reduce the minimum idle timeout and change the default value by defining TM_TELD_MIN_IDLE_TIMEOUT in trsystem.h.
Parameters
- userSrvHandle
- The server handle, as returned by tfTeldUserCreate().
- timeout
- The desired idle timeout, in seconds. This must be >= TM_TELD_MIN_IDLE_TIMEOUT.
Returns
- TM_ENOERROR
- Success
- TM_EPERM
- Not initialized; call tfTeldUserInit() first.
- TM_EINVAL
- One of the following:
- userSrvHandle is not a valid server handle, or
- timeout is less than the TM_TELD_MIN_IDLE_TIMEOUT, or
- timeout is less than the current TCP maximum retransmission time, or
- timeout is greater than the allowed maximum of 4,294,967 seconds (~49.7 days).