1. 31 Jan, 2014 9 commits
    • Philip Withnall's avatar
      6b8039a2
    • Philip Withnall's avatar
      agent: Add a ComponentSource to Component · 3724af1a
      Philip Withnall authored
      This is a type of GSource which proxies all poll events from the sockets
      in a Component. It’s necessary for the implementation of
      GPollableInputStream and GPollableOutputStream.
      
      This adds no new external API, but does add ComponentSource and
      component_source_new() as new internal API.
      3724af1a
    • Philip Withnall's avatar
      agent: Add nice_agent_recv() allowing blocking receives on sockets · 243c47ec
      Philip Withnall authored
      This is a blocking receive function, designed to be called from a worker
      thread. It cannot be used in conjunction with the existing
      nice_agent_attach_recv() API, as the blocking receive and the GSource
      would compete over access to the single copy of the data in the kernel’s
      receive buffer.
      243c47ec
    • Philip Withnall's avatar
      agent: Move GSource handling into Component · c5672702
      Philip Withnall authored
      Rather than handle GSource creation, attachment and removal in
      NiceAgent, handle it inside Component. This brings it closer to the
      networking code, and improves encapsulation of the state of each
      Component.
      c5672702
    • Philip Withnall's avatar
      agent: Support invoking I/O callbacks in non-default contexts · 2b6370a8
      Philip Withnall authored
      If the Component’s I/O receiver machinery is invoked from a thread which
      can’t acquire the main context specified for the I/O callbacks, the
      callbacks need to be queued as idle handlers in that main context.
      
      This is needed for the case where blocking reads are being performed in
      one thread, with their callbacks needing to be delivered in another
      thread.
      
      This introduces a new fine-grained lock to Component: io_mutex. This
      protects accesses to Component->io_callback, Component->io_user_data and
      Component->pending_io_callbacks. If being locked at the same time as the
      main agent lock, it must always be locked afterwards, but the agent lock
      does not *have* to be held in order to lock io_mutex.
      2b6370a8
    • Philip Withnall's avatar
    • Philip Withnall's avatar
      agent: Integrate TcpUserData into Component · 68a9632e
      Philip Withnall authored
      It was allocated separately and always set, which is a wasted
      allocation. Instead, pull the NiceAgent and Stream pointers into the
      Component directly, and eliminate the redundant allocation.
      
      This also means the NiceAgent and Stream are available for use elsewhere
      in the Component code (not just with TCP stuff).
      68a9632e
    • Philip Withnall's avatar
      agent: Move I/O callback handling from NiceAgent into Component · 6fe29601
      Philip Withnall authored
      Compartmentalise the handling of setting and clearing the user-provided
      per-Component I/O callbacks.
      
      Data flows from the socket, through nice_agent_g_source_cb(), to
      component_emit_io_callback() which calls the callback provided by the
      user when originally attaching to the stream/component.
      6fe29601
    • Philip Withnall's avatar
      agent: Move socket/source handling from NiceAgent into Component · 790974e0
      Philip Withnall authored
      This compartmentalises it a little more, reducing the spread of
      state-changing code from three files down to one.
      
      The key change is the switch from using two GSLists of NiceSockets and
      GSources in Component, to using a single GSList of a struct {
      NiceSocket, GSource }. This is possible because there is at most one
      GSource per NiceSocket. This change reduces memory overhead (from the
      GSList structures) slightly, and makes the relationship between sockets
      and sources much clearer.
      790974e0
  2. 15 Feb, 2012 1 commit
  3. 21 Sep, 2011 1 commit
  4. 21 May, 2010 1 commit
  5. 16 Feb, 2010 3 commits
  6. 07 Oct, 2009 1 commit
  7. 30 Jun, 2009 1 commit
  8. 30 Mar, 2009 1 commit
  9. 09 Mar, 2009 1 commit
  10. 04 Mar, 2009 1 commit
  11. 16 Feb, 2009 1 commit
  12. 04 Nov, 2008 1 commit
  13. 23 Oct, 2008 1 commit
  14. 22 Oct, 2008 1 commit
  15. 07 Oct, 2008 2 commits
  16. 09 Sep, 2008 1 commit
  17. 18 Aug, 2008 2 commits
  18. 07 Aug, 2008 1 commit
  19. 30 Jul, 2008 1 commit
  20. 11 Mar, 2008 1 commit
  21. 26 Nov, 2007 1 commit
  22. 16 Nov, 2007 1 commit
  23. 10 Oct, 2007 1 commit
  24. 30 Aug, 2007 1 commit
  25. 17 Jul, 2007 2 commits
  26. 16 Jul, 2007 1 commit
  27. 19 Jun, 2007 1 commit
    • Kai Vehmanen's avatar
      Major NICE agent update. Added supprt for peer-reflexive candidates, media... · 181d9d56
      Kai Vehmanen authored
      Major NICE agent update. Added supprt for peer-reflexive candidates, media keepalives, candidate keepalives, role conflict tie-breaking functionality, and for triggered checks. Added NICEAPI_EXPORT attributes to public functions. Includes numerous bugfixes to existing functionality.
      
      darcs-hash:20070619080609-77cd4-d18bf44fe48a201e59556ae5a9dff2b5a2e7e073.gz
      181d9d56