\hypertarget{classio_1_1agora_1_1rtc2_1_1_data_stream_config}{}\doxysection{io.\+agora.\+rtc2.\+Data\+Stream\+Config Class Reference}
\label{classio_1_1agora_1_1rtc2_1_1_data_stream_config}\index{io.agora.rtc2.DataStreamConfig@{io.agora.rtc2.DataStreamConfig}}


The configurations for the data stream.  


\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
boolean \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_data_stream_config_a2106dde4b52927f0536b75c64da17305}{sync\+With\+Audio}} = false
\item 
boolean \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_data_stream_config_a1e6d1b9fc745f37935e29a3c1155da3a}{ordered}} = false
\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{classio_1_1agora_1_1rtc2_1_1_data_stream_config_a2106dde4b52927f0536b75c64da17305}\label{classio_1_1agora_1_1rtc2_1_1_data_stream_config_a2106dde4b52927f0536b75c64da17305}} 
\index{io.agora.rtc2.DataStreamConfig@{io.agora.rtc2.DataStreamConfig}!syncWithAudio@{syncWithAudio}}
\index{syncWithAudio@{syncWithAudio}!io.agora.rtc2.DataStreamConfig@{io.agora.rtc2.DataStreamConfig}}
\doxysubsubsection{\texorpdfstring{syncWithAudio}{syncWithAudio}}
{\footnotesize\ttfamily boolean io.\+agora.\+rtc2.\+Data\+Stream\+Config.\+sync\+With\+Audio = false}

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{classio_1_1agora_1_1rtc2_1_1_data_stream_config_a1e6d1b9fc745f37935e29a3c1155da3a}\label{classio_1_1agora_1_1rtc2_1_1_data_stream_config_a1e6d1b9fc745f37935e29a3c1155da3a}} 
\index{io.agora.rtc2.DataStreamConfig@{io.agora.rtc2.DataStreamConfig}!ordered@{ordered}}
\index{ordered@{ordered}!io.agora.rtc2.DataStreamConfig@{io.agora.rtc2.DataStreamConfig}}
\doxysubsubsection{\texorpdfstring{ordered}{ordered}}
{\footnotesize\ttfamily boolean io.\+agora.\+rtc2.\+Data\+Stream\+Config.\+ordered = false}

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}