📄 network.html
字号:
<HTML><HEAD><TITLE>Networking Parameters</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.77+"><LINKREL="HOME"TITLE="Intercom"HREF="intercom.html"><LINKREL="UP"TITLE="Customizing Intercom for Your Needs"HREF="customize.html"><LINKREL="PREVIOUS"TITLE="Selecting a Sample Rate"HREF="customize-audio-samplerate.html"><LINKREL="NEXT"TITLE="Miscellaneous variables"HREF="customize-misc.html"></HEAD><BODYCLASS="SECTION"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Intercom: Version 0.15 Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="customize-audio-samplerate.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 4. Customizing Intercom for Your Needs</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="customize-misc.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECTION"><H1CLASS="SECTION"><ANAME="NETWORK"></A>Networking Parameters</H1><P>Intercom provides some options which configure how it communicatesover a network. Most people probably won't need to adjust these but theyare here in the event that you do.</P><DIVCLASS="SECTION"><H2CLASS="SECTION"><ANAME="CUSTOMIZE-NETWORK-PORT"></A>TCP Port</H2><P>Intercom uses two sockets in a standard call, a TCP socket for datacommunication such as parameter negotiation and a UDP socket for the actualaudio data. The UDP port used is random and is currently not configurable;however, the TCP port on which Intercom listens is set through the portvariable. By default, port is set to 4266 but can be changed through theset command. You will need to restart Intercom in order for the setting totake effect so it will be necessary to save it first.</P></DIV><DIVCLASS="SECTION"><H2CLASS="SECTION"><ANAME="CUSTOMIZE-NETWORK-LOWDELAY"></A>IPTOS_LOWDELAY</H2><P>Setting IPTOS_LOWDELAY on a socket generally causes packets on thatsocket to be sent out before others. Intercom uses this option as it is a<SPANCLASS="emphasis"><ICLASS="EMPHASIS">real-time</I></SPAN> application where audio delays are notdesired. This is unlike an application such as a web server where a minordelay really doesn't matter too much. By default, Intercom sets this optionon its audio socket. However, this behavior can be controled, through theiptos_lowdelay variable. This is a boolean variable (0 or 1) which when setto 0, the IPTOS_LOWDELAY option is not applied to the socket.</P></DIV><DIVCLASS="SECTION"><H2CLASS="SECTION"><ANAME="CUSTOMIZE-NETWORK-UDPSIZE"></A>UDP packet size</H2><P>The UDP protocol is packet based. As such, Intercom sends andreceives audio data in chunks of a certain size. The packet size Intercomuses is defendant on the sample rate and compression format used. It canvary slightly if encryption is used and can also fluctuate during a call. In general, it is desirable to keep packets relatively small to ensure aminimum audio latency. We try to be smart about this and it shouldrarely be necessary to adjust the sizes.</P><P>The UDP packet sizes are controled through two variable. they areudp_minsize and udp_maxsize which control the minimum and maximum packetsizes respectively. By default, udp_minsize is set to 64 and udp_maxsize is512.</P><P>The udp_minsize variable is most important when audio compression isused. If it is too high, audio data will buffer and higher latencies willresult. However, if it is too low, many packets can be sent which cancause problems of its own. The value of 64 is reasonable in most cases. Itwas chosen so as not to buffer up too much data and when using a CODEC suchas GSM at 8k, it will limit packets to a single frame.</P><P>The udp_maxsize variable in contrast, is more important whencompression is disabled. It can also come into play when compression isused and a high sample rate is employed. If Intercom is sending packetswhich you think are too large, you can decrease this value. However, don'tbring it too close to udp_minsize. Intercom needs some flexibility in howit sizes packets.</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="customize-audio-samplerate.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="intercom.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="customize-misc.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Selecting a Sample Rate</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="customize.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Miscellaneous variables</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -