PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Keep-alive on connection
HFSQL Client/ServerAvailable only with this kind of connection
Overview
A connection to the database can be interrupted at any time at "hardware" level: wire missing, device stand-by, WiFi connection interrupted, etc.
When losing a connection, nothing is done by the TCP/IP standard. The server waits for the possible communication from client.
HFSQL Client/Server allows you to define a timeout or more precisely a time-to-live (TTL).
This allows you to define the frequency at which the server will check the client presence. Without response from the client, the connection is closed and the current transactions are freed: no more "ghost" connections because of mobile devices!
How to?
To configure the keep-alive on connection on an HFSQL server:
  • By programming: use HSetServer associated with the hkaInterval and hkaTimeout constants:
    • the hkaInterval constant is used to define the maximum time (in seconds) after which, if no communication is established between the server and the client, the server will check the presence of client. This time is set to 30 minutes by default.
    • the hkaTimeout constant is used to define the server timeout when checking the presence of client. If the client is not found at the end of this timeout, the client is automatically disconnected (server side). This duration is set to 2 minutes by default.
  • Via the HFConf.INI file:
    • the KeepAliveInterval keyword of INIT section is used to define the maximum time (in seconds) after which, if no communication is established between the server and the client, the server will check the presence of client. This time is set to 30 minutes by default.
    • the KeepAliveTimeout keyword of INIT section is used to define the server timeout when checking the presence of client. If the client is not found at the end of this timeout, the client is automatically disconnected (server side). This duration is set to 2 minutes by default.
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment