|
|
|
|
|
- Communication with robots or with non-WINDEV applications
- Transmission between two computers that use character strings in different formats (UNICODE and ANSI)
- Required permissions
SocketWrite (Function) In french: SocketEcrit 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 computer to another regardless of the type of network.
IF SocketWrite("server", "hello world") = True THEN Message("Message sent") 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: <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. SocketChangeTransmissionMode is used to change this transmission mode: the SocketNoEndTag constant allows you not to modify the frames read and written. Transmission between two computers that use character strings in different formats (UNICODE and ANSI) Some conversions may be required when messages are transmitted between two computers that use character strings in different formats (Windows (ANSI) and Windows Mobile (UNICODE) for example). These conversions can be made by AnsiToUnicode and UnicodeToAnsi.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|