ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control / WLanguage procedure
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
WLanguage procedure called by WebSocketClientConnect
WLanguage procedure ("callback") called by WebSocketClientConnect when the connection to the server is established.
This procedure is called in the following cases:
  • when the connection to the server is established,
  • when data is received,
  • when the socket is closed,
  • when an error occurs.
WARNING: the Procedure is called in the application's main thread:
  • You can access UI controls from the procedure.
  • The process should not be too long, since this could block the user.
Example
WebSocketClientConnect("client", WebSocketClientConnecte_Callback, "monserveur.com")

INTERNAL PROCEDURE WebSocketClientConnecte_Callback(nEvénement, sMessage)
	SWITCH nEvénement
		CASE SocketOpening
			SocketWrite("client", "Envoi message depuis le navigateur.")

		CASE SocketMessage
			Info("Réception d'un message serveur : " + sMessage)

		CASE SocketClosing
			Info("Fermeture du socket", sMessage)

		CASE SocketError
			Error("Erreur du socket")
	END
END
Syntax
WebSocketClientConnect_Callback(<Event> , <Message>)
<Event>: Integer constant
Corresponds to one of the following constants:
SocketClosingThe socket is closed. The <Message> parameter contains a code that indicates the reason for closing.
SocketErrorAn error occurred during the communication with the server. The <Message> parameter is always empty.
SocketMessageThe socket received a message. The <Message> parameter contains data relative to the message.
SocketOpeningThe socket is connected to the server. You have the ability to send messages.
<Message>: Character string
Response from the server according to the <Event>.
Component: wd300com.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help