syb_sendmsg

Description

(UNIX only) Sends a message to a User Datagram Protocol (UDP) port.

Syntax

syb_sendmsg ip_address, port_number, message

Parameters

ip_address

is the IP address of the machine where the UDP application is running.

port_number

is the port number of the UDP port.

message

is the message to send. It can be up to 255 characters in length.

Examples

Example 1

Sends the message “Hello” to port 3456 at IP address 120.10.20.5:

select syb_sendmsg("120.10.20.5", 3456, "Hello")

Example 2

Reads the IP address and port number from a user table, and uses a variable for the message to be sent:

declare @msg varchar(255)
    select @msg = "Message to send"
    select syb_sendmsg (ip_address, portnum, @msg)
    from sendports
    where username = user_name()

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute syb_sendmsg.

See also

System procedure sp_sendmsg