ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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 SocketConnect
WLanguage procedure written in browser code ("callback"), called by SocketConnect. Name of the procedure called when the connection to the server is established. This procedure is used to send a message to the server with SocketWrite.
Example
SocketConnect("client", "ws[s]://<AdresseDuServeurDeWebSocket>", SurEvenementSocket)

INTERNAL PROCEDURE SurEvenementSocket(nEvenement, sMessage)

	SWITCH nEvenement

		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
SocketConnect_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>.
Business / UI classification: Neutral code
Component: WDJS.DLL
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help