mirror of https://github.com/sipwise/kamailio.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.8 KiB
59 lines
1.8 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
|
|
|
<refentry id="sstream_get_str"> <!-- ID for references -->
|
|
|
|
<refmeta>
|
|
<refentrytitle>sstream_get_str</refentrytitle> <!-- title shown in references -->
|
|
<manvolnum>3</manvolnum></refmeta> <!-- man volume id (3 for libraries) -->
|
|
|
|
<refnamediv>
|
|
<refname>sstream_get_str</refname> <!-- function name -->
|
|
<refpurpose>read data from input stream</refpurpose> <!-- short function description -->
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv><funcsynopsis>
|
|
<funcsynopsisinfo>
|
|
#include <cds/serialize.h> <!-- included headers -->
|
|
</funcsynopsisinfo>
|
|
|
|
<funcprototype> <!-- function prototype -->
|
|
<funcdef>int <function>sstream_get_str</function></funcdef>
|
|
<paramdef>sstream_t *<parameter>ss</parameter></paramdef>
|
|
<paramdef>int <parameter>length</parameter></paramdef>
|
|
<paramdef>str_t *<parameter>dst</parameter></paramdef>
|
|
</funcprototype>
|
|
|
|
</funcsynopsis></refsynopsisdiv>
|
|
|
|
<refsect1><title>Description</title>
|
|
<para>Reads <parameter>len</parameter> bytes from input stream makes a copy of
|
|
them and returns them in string <parameter>dst</parameter>. For allocation it
|
|
uses cds_malloc function. The string may be freed using for example
|
|
<function>str_free_content</function>. If there is not enough data to read (less
|
|
than <parameter>len</parameter> bytes), the function returns error.
|
|
<!-- detailed description -->
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1><title>Return value</title>
|
|
<para>
|
|
<!-- return value description -->
|
|
Returns 0 on success, non-zero on error.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1><title>See Also</title>
|
|
<para>
|
|
<xref linkend="sstream_t"/>, <xref linkend="sstream_get"/>, <xref
|
|
linkend="sstream_get_str_ex"/>
|
|
<!-- references to other pages -->
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|