int error = SendData(APTR handle, APTR buf, int size, int *n, struct hwTagList *tags);
size
bytes from
the memory buffer buf
to the connection specified by handle
. Upon returning, your
implementation of SendData()
has to write the number of bytes successfully sent to n
.
Note that returning less than size
bytes in n
isn't considered an error by Hollywood. Even
a value of 0 in n
isn't considered an error by Hollywood. It just indicates that currently
no bytes could be sent to the connection.
To indicate an error, your implementation of SendData()
has to return an error
code. This can be a custom error registered through hw_RegisterError()
or one of Hollywood's predefined error codes (see hollywood/errors.h
). The following
predefined error codes have a special meaning:
ERR_SENDTIMEOUT:
NULL
)