g_io_channel_read_chars (
  GIOChannel* channel,
  gchar* buf,
  gsize count,
  gsize* bytes_read,
  GError** error


Replacement for g_io_channel_read() with the new API.



Type: An array of guint8

a buffer to read data into.

The argument will be set by the function.
The length of the array is specified in the count argument.
The data is owned by the caller of the function.

Type: gsize

The size of the buffer. Note that the buffer may not be completely filled even if there is data in the buffer if the remaining data is not a complete character.


Type: gsize*

The number of bytes read. This may be zero even on success if count < 6 and the channel’s encoding is non-NULL. This indicates that the next UTF-8 character is too wide for the buffer.

The argument will be set by the function.
The argument can be NULL.

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: GIOStatus

The status of the operation.