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 |
gint64 |
Offset position of the data being requested within the payload. |
|
len |
size_t |
Size in bytes of the input data being provided. |
|
rep_len |
size_t |
Amount of bytes to replace/overwrite (if any) |
|
data |
An array of char |
A pointer to the data being provided. |
|
The length of the array is specified in the len argument. | |
The called function takes ownership of the data, and is responsible for freeing it. | |
Each element is a NUL terminated UTF-8 string. |