sstream_get_str
3

# sstream_get_str

read data from input stream

    #include <cds/serialize.h>

      int sstream_get_str
      sstream_t *ss
      int length
      str_t *dst

## Description

Reads `len` bytes from input stream makes a copy of them and returns them in string `dst`. For allocation it uses cds_malloc function. The string may be freed using for example `str_free_content`. If there is not enough data to read (less than `len` bytes), the function returns error.

## Return value

Returns 0 on success, non-zero on error.

## See Also

, ,