NETLink::XDRSend()

Description

XDRSend() is used to send count items from a data array over the NETLink.

Call Signature

int XDRSend ( any ptr data [, int count] )

Return Value

int

The method will return 0 for failure or a non-zero value if it succeeds.

Arguments

any ptr data:

Pointer to an array of data of type byte, char, int, float, double which should be sent over the link. Alternatively a string, or mstring value may be passed in order to transmit one or more strings. A scalar numeric value will be transmitted as a single double.

[ int count ]:

Number of items of the type of data to be sent. If not specified the count is derived from the size of the data array. If a string is sent this count is ignored, and the entire string is sent.

Remarks

If data is not of one of the indicated types, an error will occur.

This function is very similar to Send() with a few exceptions:
  • String, and mstring values can be transported.
  • Scalar numeric values will be transmitted (always as a double).
  • Byte swapping, and potentially other data conversion issues will be handled automatically if the receiving end uses XDRAccept(), and if the link flags have been set appropriately.

Example

Send a list of strings, preceded by a count over a link.


 call poLink.XDRSend( f$len(name_list) )
 call poLink.XDRSend( name_list )

See also

NETLink class

Inter-process communication

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.