a0Probe()

Performs a blocking probe in a port.


Syntax

a0tError a0Probe(
a0tPort *port,
int source,
int tag,
a0tRequest *request );

Arguments

Namerd/wrDescription
port read Port to probe (on caller's node).
source read Source node to probe.
tag read tag to use.
request write Request descriptor to hold the status.

Description

This function performs a blocking probe on a given port port, from a given source node source (or A0AnySource if any node will do), with a given tag tag. A request is posted to probe a received a message.

A probe request is said to be completed when a message is arrived. It is useful to receive messages without knowing previously its size and origin. A probe is usually followed by a dynamic memory allocation and a0Receive() or .

NULL cannot be passed as request.

On return of this function, the variable pointed by request contains an opaque request that can be used later to test or wait the completion of the probe operation or get information about it.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0Err...Some error occurred.
A0ErrOkSuccessful completion.

See Also

a0IProbe() a0GetRequestData() a0Receive() a0IReceiveBuffer()