Sends data to a UDP socket.
&SOCKET SEND_TO ID=socket_id
{ MDO=mdo_name | VARS=prefix* [ RANGE=(start,end) ] |
VARS={ name | name,name,... name) } |
ARGS [ RANGE=(start,end) ] | DATA=data }
{ ADDRESS=ip_address | HOSTNAME=host_name }
PORT=port_id
SEND_TO is used to send the data on a UDP socket, identified by the ID parameter, to the specified host and port number.
Operands:
(Mandatory) Specifies the identifier of the socket that is to be used for communication.
Indicates that the data to be sent is formatted in the specified MDO.
Supplies leading characters terminated by an asterisk to denote a numeric range of variables, which contain the data to be sent.
Specifies the names of the variables containing the data to be sent.
The RANGE operand is coded to designate a start number and an end number to delimit the number of variables sent. The start and end values must be in the range 0 to 32767 and the end value must be equal to or greater than the start value.
Specifies the data to be sent.
Specifies the IP address of the destination host.
Specifies the name of the destination host.
Specifies the UDP port number of the destination. Port numbers range from 0 to 65535.
Examples: & SOCKET SEND_TO
&SOCKET SEND_TO ID=&NSOCKID MDO=MDO1 PORT=&PRT +
ADDRESS=172.24.91.45
Return Codes:
Send_to successful.
Send_to failed; see &ZFDBK for reason code, &ZSOCERRN and &ZSOCVERR for further error information.
Notes:
UDP protocol does not guarantee delivery of the data, however when an application sends data out, it arrives at the remote end as a single unit. For example, if an application does five sends, the application at the remote end will do five receives. Also, the size of each send matches the size of each receive.
The &SOCKET SEND_TO verb is executed only by applications using UDP sockets.
The maximum size datagram that is sent is determined by the vendor interface. Attempting to send a larger datagram results in ZFDBK being set to 3, for example, &ZSOCERRN to 29 (EMSGSIZE).
| Copyright © 2009 CA. All rights reserved. |
|