\hypertarget{structagora_1_1rtc_1_1_data_stream_config}{}\doxysection{agora\+::rtc\+::Data\+Stream\+Config Struct Reference}
\label{structagora_1_1rtc_1_1_data_stream_config}\index{agora::rtc::DataStreamConfig@{agora::rtc::DataStreamConfig}}


The configurations for the data stream.  




{\ttfamily \#include $<$Agora\+Base.\+h$>$}

\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{structagora_1_1rtc_1_1_data_stream_config_a63c6017d54bc92bf01d11b6a8f0da04f}{sync\+With\+Audio}}
\item 
bool \mbox{\hyperlink{structagora_1_1rtc_1_1_data_stream_config_ab7e187a05c8abea8da12a2383ce265f1}{ordered}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The configurations for the data stream. 

The following table shows the S\+DK behaviors under different parameter settings\+: \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily sync\+With\+Audio} }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily ordered} }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ S\+DK behaviors  }\\\cline{1-3}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily sync\+With\+Audio} }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily ordered} }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ S\+DK behaviors  }\\\cline{1-3}
\endhead
{\ttfamily false} &{\ttfamily false} &The S\+DK triggers the {\ttfamily on\+Stream\+Message} callback immediately after the receiver receives a data packet.  \\\cline{1-3}
{\ttfamily true} &{\ttfamily false} &If the data packet delay is within the audio delay, the S\+DK triggers the on\+Stream\+Message callback when the synchronized audio packet is played out. If the data packet delay exceeds the audio delay, the S\+DK triggers the on\+Stream\+Message callback as soon as the data packet is received.  \\\cline{1-3}
{\ttfamily false} &{\ttfamily true} &If the delay of a data packet is less than five seconds, the S\+DK corrects the order of the data packet. If the delay of a data packet exceeds five seconds, the S\+DK discards the data packet.  \\\cline{1-3}
{\ttfamily true} &{\ttfamily true} &If the delay of the data packet is within the range of the audio delay, the S\+DK corrects the order of the data packet. If the delay of a data packet exceeds the audio delay, the S\+DK discards this data packet.  \\\cline{1-3}
\end{longtabu}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{structagora_1_1rtc_1_1_data_stream_config_a63c6017d54bc92bf01d11b6a8f0da04f}\label{structagora_1_1rtc_1_1_data_stream_config_a63c6017d54bc92bf01d11b6a8f0da04f}} 
\index{agora::rtc::DataStreamConfig@{agora::rtc::DataStreamConfig}!syncWithAudio@{syncWithAudio}}
\index{syncWithAudio@{syncWithAudio}!agora::rtc::DataStreamConfig@{agora::rtc::DataStreamConfig}}
\doxysubsubsection{\texorpdfstring{syncWithAudio}{syncWithAudio}}
{\footnotesize\ttfamily bool agora\+::rtc\+::\+Data\+Stream\+Config\+::sync\+With\+Audio}

Whether to synchronize the data packet with the published audio packet.
\begin{DoxyItemize}
\item {\ttfamily true}\+: Synchronize the data packet with the audio packet. This setting is suitable for special scenarios such as lyrics synchronization.
\item {\ttfamily false}\+: Do not synchronize the data packet with the audio packet. This setting is suitable for scenarios where data packets need to arrive at the receiving end immediately. When you set the data packet to synchronize with the audio, then if the data packet delay is within the audio delay, the S\+DK triggers the {\ttfamily on\+Stream\+Message} callback when the synchronized audio packet is played out. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1rtc_1_1_data_stream_config_ab7e187a05c8abea8da12a2383ce265f1}\label{structagora_1_1rtc_1_1_data_stream_config_ab7e187a05c8abea8da12a2383ce265f1}} 
\index{agora::rtc::DataStreamConfig@{agora::rtc::DataStreamConfig}!ordered@{ordered}}
\index{ordered@{ordered}!agora::rtc::DataStreamConfig@{agora::rtc::DataStreamConfig}}
\doxysubsubsection{\texorpdfstring{ordered}{ordered}}
{\footnotesize\ttfamily bool agora\+::rtc\+::\+Data\+Stream\+Config\+::ordered}

Whether the S\+DK guarantees that the receiver receives the data in the sent order.
\begin{DoxyItemize}
\item {\ttfamily true}\+: Guarantee that the receiver receives the data in the sent order.
\item {\ttfamily false}\+: Do not guarantee that the receiver receives the data in the sent order. Do not set this parameter as {\ttfamily true} if you need the receiver to receive the data packet immediately. 
\end{DoxyItemize}