|
|
|
|
|
- Communication with robots or with non-WINDEV applications
- Transmission between two workstations using different string 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 machine 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. 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 workstations using different string formats (Unicode and ANSI) When transmitting messages between two workstations using a different string format (e.g. Windows (ANSI) and Windows Mobile (Unicode)), some conversions may be necessary. These conversions can be made by AnsiToUnicode and UnicodeToAnsi.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|