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.


buf 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.
count 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.

bytes_read 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.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: GIOStatus

The status of the operation.