Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sa_save_trace_data system procedure Next Page

sa_send_udp system procedure


Sends a UDP packet to the specified address.

Syntax

sa_send_udp(
destAddress,
destPort,
msg
)

Arguments
Remarks

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.

Permissions

DBA authority required

Side effects

None

See also
Example

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' );