Sends a message to an application using a TCP/IP connection.
action='SOCKET port=windowname[;host=hostname][;sendText=text][;recvText=text[;timeout=seconds]]'
The SOCKET command is used for passing dynamic information to a running application, and for integrating messages into Java and Visual Basic applications. Both languages do not support custom window messaging, and eMbedded Visual Basic does not support command line parameters.
To connect to a socket, you must specify the port and the host. Use sendText to input your message.
Use recvText to display a message when confirming that sendText is successfully received by the application. When using recvText, you can specify a timeout limit. The action fails if the Listener can not connect, send acknowledgments, or receive acknowledgments during the timeout limit.
The following example forwards the string in $sender=$message to a local application that is listening on port 12345. The Listener expects the application to send "beeperAck" as an acknowledgment within 5 seconds.
dblsn -l "action='socket port=12345; sendText=$sender=$message; recvText=beeperAck; timeout=5'" |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |