a0SendBuffer()

Performs a blocking send of a buffer.


Syntax

a0tError a0SendBuffer(
a0tPort *port,
int dest,
int tag,
a0tRequest *request,
a0tBuffer *buffer );

Arguments

Namerd/wrDescription
port read Port to send to (on destination node).
dest read Destination node to send to.
tag read tag to use.
request write Request descriptor to hold the status.
buffer read Send buffer.

Description

This function performs a blocking send to a given port port on a given node dest, with a given tag tag. It blocks the calling thread to send data from the buffer buffer.

Only the amount of data packed in the buffer will be sent, regardless of the total size allocated. The buffer is kept intact after being sent. It can be sent again many times or be used to pack aditional data. To clear packed data inside a buffer and reuse it to pack new data, use a0ClearBuffer().

On return of this function, the variable pointed by request contains an opaque request that can be used later to check the completion status of the send operation.


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

a0ISendBuffer() a0Send() a0ISend() a0ReceiveBuffer() a0Pack() a0Unpack() a0ClearBuffer()