<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.18015">
<STYLE><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></STYLE>
</HEAD>
<BODY lang=EN-US id=MailContainerBody
style="PADDING-TOP: 15px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px" leftMargin=0
link=#0563c1 topMargin=0 vLink=#954f72 CanvasTabStop="true"
name="Compose message area">
<DIV>Hello,<o:p></o:p></DIV>
<DIV class=WordSection1>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>I am wondering whether one main loop can serve several
agents? It seems Yes from code tests\test-fullmode.c.<o:p></o:p></P>
<P class=MsoNormal>I am asking because I need to support multiple (up to 8)
media streams concurrently. So I would like to create multiple agents form each.
But I would like to have 1 main loop to process events from all of these
agents.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Please let me know if this architecture is feasible and
libnice can support multiple candidates gathering, negotiating etc
simultaneously.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Tom<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Main()<o:p></o:p></P>
<P class=MsoNormal>{<o:p></o:p></P>
<P class=MsoNormal> . . . . . . . . . . .<o:p></o:p></P>
<P class=MsoNormal> global_mainloop = g_main_loop_new (NULL,
FALSE);<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> /* Note: impl limits ...<o:p></o:p></P>
<P class=MsoNormal> * - no multi-stream support<o:p></o:p></P>
<P class=MsoNormal> * - no IPv6 support<o:p></o:p></P>
<P class=MsoNormal> */<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> /* step: create the agents L and R */<o:p></o:p></P>
<P class=MsoNormal>#if USE_RELIABLE<o:p></o:p></P>
<P class=MsoNormal> lagent = nice_agent_new_reliable
(g_main_loop_get_context (global_mainloop),<o:p></o:p></P>
<P class=MsoNormal>
NICE_COMPATIBILITY);<o:p></o:p></P>
<P class=MsoNormal> ragent = nice_agent_new_reliable
(g_main_loop_get_context (global_mainloop),<o:p></o:p></P>
<P class=MsoNormal>
NICE_COMPATIBILITY);<o:p></o:p></P>
<P class=MsoNormal>#else<o:p></o:p></P>
<P class=MsoNormal> lagent = nice_agent_new (g_main_loop_get_context
(global_mainloop),
<SPAN style="FONT-FAMILY: Wingdings">ç</SPAN> agent 1<o:p></o:p></P>
<P class=MsoNormal>
NICE_COMPATIBILITY);<o:p></o:p></P>
<P class=MsoNormal> ragent = nice_agent_new (g_main_loop_get_context
(global_mainloop),
<SPAN style="FONT-FAMILY: Wingdings">ç</SPAN> agent 2<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>
NICE_COMPATIBILITY);<o:p></o:p></P>
<P class=MsoNormal>#endif<o:p></o:p></P>
<P class=MsoNormal>}</P></DIV></BODY></HTML>