Virtual Method
HexBufferset_data
Declaration
gboolean
set_data (
HexBuffer* self,
gint64 offset,
size_t len,
size_t rep_len,
char* data
)
Description
Set data at of the buffer at a particular offset, replacing some, all or none of the existing data in the buffer as desired.
As data will be copied to the recipient, it should be freed with
g_free() after being passed to this method, to avoid a memory leak.
Parameters
offset-
Type:
gint64Offset position of the data being requested within the payload.
len-
Type:
size_tSize in bytes of the input data being provided.
rep_len-
Type:
size_tAmount of bytes to replace/overwrite (if any)
data-
Type: An array of
charA pointer to the data being provided.
The length of the array is specified in the lenargument.The called function takes ownership of the data, and is responsible for freeing it. Each element is a NUL terminated UTF-8 string.