ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Sockets
  • Communication with robots or with non-WINDEV applications
  • Transmission between two stations using different string formats (Unicode and ANSI)
  • Required permissions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Writes a message intended to another socket. This function can be used on a client computer or on a server.
Reminder A socket is a communication resource used by applications to communicate from one machine to another, regardless of the type of network.
Example
IF SocketWrite("Serveur", "hello world") = True THEN
	Message("message envoyé")
END
Syntax

Writing into a socket Hide the details

<Result> = SocketWrite(<Socket name> , <Message>)
<Result>: Boolean
  • True if the function was successful,
  • False otherwise. If an error occurs, you can get more details on the error with ErrorInfo.
<Socket name>: Character string
Name of the socket that received the message.
In a WINDEV application, this name was defined on the server:
In a WINDEV application, on the client, this name was defined by SocketConnect, SocketConnectSSL or SocketConnectInfrared.
<Message>: String or buffer
Message to transmit. The message format can be defined with SocketChangeTransmissionMode.
Remarks

Communication with robots or with non-WINDEV applications

To simplify the exchanges of data by socket, a transmission mode is initialized by default.
For a communication with an external module (non-WINDEV application, robot, ...), this transmission mode can prevent the communications from operating properly.
The SocketChangeTransmissionMode function is used to change this transmission mode: the constant SocketSansMarqueurFin constant is used to leave the read and write patterns unchanged.

Transmission between two stations using different string formats (Unicode and ANSI)

When transmitting messages between two workstations using different string formats (e.g. Windows (ANSI) and Windows Mobile (Unicode)), certain conversions may be necessary. These conversions can be made by AnsiToUnicode and UnicodeToAnsi.
AndroidAndroid Widget

Required permissions

This function changes the permissions required by the application.
Required permission: INTERNET
This permission allows the applications to open the network sockets.
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/02/2025

Send a report | Local help