Error getting tags :
error 404Error getting tags :
error 404 write to socket | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
write to socket
Basics
Expander triangle
Type
Command
Syntax

write value to socket socket [with message callbackMessage]

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Network
Summary
Sends data to a socket.
Examples

write field "Outputs" to socket "127.0.0.0:21"
write "HELO" & linefeed to socket mailSocket
write myData to socket "127.0.0.0:345" with message "doneTransact"

Additional Comments
Expander triangle

Use the write to socket command to send data to another system via a TCP socket.

Parameters:

The value is any expression that evaluates to a string.

The socketID is the identifier (set when you opened the socket) of the socket you want to send data to. The socket identifier starts with the IP address of the host the socket is connected to, and may optionally include a port number (separated from the IP address by a colon). If there is more than one socket connected to that host and port, you can specify which socket by appending the connection name or number that was assigned when the socket was opened, separated from the port number by a vertical bar (|).

The callbackMessage is the name of a message to be sent to the current object when the write is successfully completed.

Comments:

If you specify a callbackMessage, as soon as the write is finished, the specified message is sent to the object whose script contains the write to socket command. The callbackMessage is sent with one parameter, which is the socketID.

If you don't specify a callbackMessage, the handler pauses until the write has been completed, or until the time set in the socketTimeoutInterval property has passed.

User Comments
Expander triangle