ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / WebSocket
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Sends a message from the WebSocket server to the client.
Example
// Récupère la liste des clients
tabClients is array of websocketClient = WebSocketListConnectedClient()
// Pour envoyer un message à chacun
FOR EACH oClient OF tabClients
	WebSocketSend(oClient, bufMessage)
END
Syntax
WebSocketSend(<Client> , <Message>)
<Client>: websocketClient variable
Name of the websocketClient variable that corresponds to the client to which the message will be sent.
<Message>: Character string
Message to send.
Remarks
  • This function is asynchronous the function simply requests that the message be sent to the client. The message can actually be sent later (after WebSocketSend has been executed). WebSocketSend never returns an error (for example, if the client has been disconnected in the meantime).
  • The WebSocket protocol allows two message formats: binary or string (encoded in UTF-8). WebSocketSend automatically chooses the format according to the type of parameter received.
Business / UI classification: Business Logic
Component: wd300awws.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help