Sends a UDP packet to the specified address.
sa_send_udp( destAddress, destPort, msg )
destAddress Use this CHAR(254) to specify either the host name or IP number.
destPort Use this UNSIGNED SMALLINT parameter to specify the port number to use.
msg Use this LONG BINARY parameter to specify the message to send to the specified address. If this value is a string, it must be enclosed in single quotes.
This procedure sends a single UDP packet to the specified address. The procedure returns 0 if the message is sent successfully, and returns an error code if an error occurs. The error code is one of the following:
If the msg parameter contains binary data or is more complex than a string, you may want to use a variable. For example,
CREATE VARIABLE v LONG BINARY; SET v='This is a UDP message'; SELECT dbo.sa_send_udp( '10.25.99.124', 1234, v ); DROP VARIABLE v; |
This procedure can be used with MobiLink server-initiated synchronization to wake up the Listener utility (dblsn.exe). If you use the sa_send_udp system procedure as a way to notify the Listener, you should append a 1 to your UDP packet. This number is a server-initiated synchronization protocol number. In future versions of MobiLink, new protocol versions may cause the Listener to behave differently.
DBA authority required
None
The following example sends the message "This is a test" to IP address 10.25.99.196 on port 2345:
CALL sa_send_udp( '10.25.99.196', 2345', 'This is a test' ); |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |