write_data


Description:

public Result write_data (owned uint8[] data, out uint id)

Write data using the connection of the this.

If it cannot be sent immediately, it will be queued for transmission in this. The contents of message will then be serialized and transmitted when the connection of the this becomes writable. In case the message is queued, the ID returned in id will be non-zero and used as the ID argument in the message_sent callback.

This function will take ownership of data and g_free it after use.

If the amount of queued data exceeds the limits set with set_send_backlog , this function will return ENOMEM.

Parameters:

this

a Watch

data

the data to queue

id

location for a message ID or null

size

the size of data

Returns:

OK on success. ENOMEM when the backlog limits are reached. EINTR when this was flushing.




2022 vala-language.org