Home | Sign in | English EN
New WINDEV and WEBDEV 26 feature!
This content has been translated automatically. Click here to view the French version.
  • Execution contexts
  • Asynchronous operating mode
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Runs a global Procedure in the context of a client connected to the WebSocket server.
// Retrieves the list of customers
arrClients is array of websocketClient = WebSocketListConnectedClient()
// Force the call to the SetInformation procedure in each client
sInformation is string = GetInformation()
FOR EACH Client OF arrClients
WebSocketExecute(Client, SetInformation)
// SendInformation is a global Procedure that uses the Variable sInformation
WebSocketRun(<Client> , <WLanguage procedure> [, <Parameters>])
<Client>: websocketClient variable
Name of the websocketClient variable corresponding to the client in which the procedure will be executed.
<WLanguage procedure>: Procedure name
Name of the global Procedure WLanguage to be executed in the customer context.
<Parameters>: List of values enclosed in brackets and separated by commas
Parameters of the procedure. This list of parameters has the following format:
(<Parameter 1>, ..., <Parameter N>)
  • <Parameter 1>: First procedure parameter.
  • ...
  • <Parameter N>: Nth procedure parameter.
  • Parameters are passed by value.
  • Only simple types are allowed: Boolean, integer, ... For example, it is not possible to have a parameter corresponding to an instance of class.
This parameter is only available from Update 1.

Execution contexts

The global service of the WebSocket server and the connected clients are executed independently. Each is executed in its own context with:
  • its own copy of global variables.
  • its own database context.
  • etc.
Therefore, it is not possible to handle the global context or the context of another client.
WebSocketExecute is used to execute the WLanguage procedure passed as parameter in the context of another client. During the execution of the procedure, the global variables will be those of the target client.

Asynchronous operating mode

The operating mode is asynchronous: the function simply requests the execution of the procedure. The procedure can actually be executed later (after WebSocketExecute has been executed). WebSocketExecute never returns an error (for example, if the client has been disconnected in the meantime).
Business / UI classification : Business Logic
Component : wd260awws.dll
Minimum version required
  • Version 26
This page is also available for…
Click [Add] to post a comment