a0ClearBuffer()

Clears a buffer to reuse.


Syntax

a0tError a0ClearBuffer(
a0tBuffer *buffer );

Arguments

Namerd/wrDescription
buffer write Descriptor of the buffer to clean.

Description

This function cleans buffer, after being sent, so the program can reuse it. After sending the data to a remote node, the buffer still contains everything in the state it was, so the buffer can be sent again, containing the same data, to other node. A buffer must be cleared before new data is packed into it. After creating or clearing a buffer, it is said to be empty.

After calling this function, the type and the size of the buffer do not change.


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

a0Pack() a0SendBuffer() a0StartRemoteThread() a0StartRemoteUrgent() a0DisposeBuffer() a0NewBuffer()