ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
<Connection variable>.SimulateNetwork (Function)
In french: <Variable Connexion>.SimuleRéseau
HFSQL Client/ServerAvailable only with this kind of connection
Simulates how the HFSQL Client/Server works:
  • on an ADSL, 3G, 4G and 5G network or via the cloud.
  • on a slow network with custom settings.
Remark: This function can be used to test an application (locally or over a LAN) that uses HFSQL in an ADSL, 3G, 4G or 5G network, in the cloud or with custom settings. This function slows down all the communications between the client and the HFSQL server.

This function is used when debugging and optimizing an application.
Example
// Describe the connection
MyConnection is Connection
 
// Simulate the 3G network
MyConnection.SimulateNetwork(h3G)
ProfilerStart()
Proc_Process() // Process whose performance in 3G must be analyzed
ProfilerEnd()
// Back to a standard operating mode
MyConnection.SimulateNetwork(hNone)
Syntax

Simulating how HFSQL Client/Server works on a previously configured network Hide the details

<Result> = <Connection>.SimulateNetwork(<Type of network>)
<Result>: Boolean
  • True if the simulation is started,
  • False if an error occurs.
<Connection>: Connection variable
Name of the Connection variable that describes the connection to use.
<Type of network>: Integer constant
Type of network to simulate:
h3GType of network to simulate: 3G
Characteristics (estimate): Latency: 130ms, Bandwidth: 1 Mbps
h4GType of network to simulate: 4G
Characteristics (estimate): Latency: 40ms, Bandwidth: 30 Mbps
h5GType of network to simulate: 5G
Characteristics (estimate): Latency: 10ms, Bandwidth: 100 Mbps
hADSLType of network to simulate: ADSL
Characteristics (estimate): Latency: 40ms, Bandwidth: 8 Mbps
hCloudType of network to simulate: Cloud.
Characteristics (estimate): Latency: 10ms, Bandwidth: 400 Mbps
These values apply when the application is used from the same continent as the data center, with a fiber Internet connection. If the application is used from another continent, or with a Wi-Fi connection, it is recommended to use the second syntax of the function by specifying the latency and the speed of the connection.
hNoneUsed to disable the simulation of a specific network.

Simulating how HFSQL Client/Server works on a custom network Hide the details

<Result> = <Connection>.SimulateNetwork(<Latency> , <Bandwidth>)
<Result>: Boolean
  • True if the simulation is started,
  • False if an error occurred.
<Connection>: Connection variable
Name of the Connection variable that describes the connection to use.
<Latency>: Integer
Simulated latency expressed in milliseconds. This latency is added to the latency of the current network.
<Bandwidth>: Real
Bandwidth expressed in megabits per second. It represent the time needed to transfer a given amount of data (assuming that the current network has an infinite bandwidth).
Remarks
  • This function must not be used in a deployed application. This function is used when debugging and optimizing an application.
  • This function increases the latency and reduces the throughput of the network connections used for HFSQL Client/Server.
Component: wd290hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help