AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Área de texto enriquecido / Procedimiento WLanguage
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
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]://<WebSocketServerAddress>", OnSocketEvent)

INTERNAL PROCEDURE OnSocketEvent(nEvent, sMessage)

	SWITCH nEvent

		CASE SocketOpening
			SocketWrite("client", "Send message from the browser.")

		CASE SocketMessage
			Info("Server message received: " + sMessage)

		CASE SocketClosing
			Info("Socket closed", sMessage)

		CASE SocketError
			Error("Socket error")
	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
Versión mínima requerida
  • Versión 22
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/05/2022

Señalar un error o enviar una sugerencia | Ayuda local