1. 31 Jan, 2014 11 commits
    • Philip Withnall's avatar
      agent: Move gtk-doc comments from agent.c to agent.h for new API · 55e53a9c
      Philip Withnall authored
      I completely disagree with this, and believe the C file is a much better
      place for them, as then they’re:
       • easier to read while hacking on the functions, and
       • easier to modify once finished hacking on the functions.
      I think the argument for putting them in the header files (so that the
      documentation is available by the function declarations) is weak, as the
      generated gtk-doc manual should be installed on the system alongside the
      header files in any case.
    • Philip Withnall's avatar
      agent: Add support for vectored I/O for receives · 253be348
      Philip Withnall authored
      Add two new public functions:
       • nice_agent_recv_messages()
       • nice_agent_recv_messages_nonblocking()
      which allow receiving multiple messages in a single call, and support
      vectors of buffers to receive the messages into.
      The existing nice_agent_recv[_nonblocking]() APIs have been left
      This tidies up a lot of the message handling code internally, and
      eliminates a couple of memcpy()s. There are still a few more memcpy()s
      on the critical path, which could be eliminated with further work.
      In the reliable agent case, every message is memcpy()ed twice: once into
      the pseudo-TCP receive buffer, and once out of it. The copy on input
      could be eliminated (in the case of in-order delivery of packets) by
      receiving directly into the receive buffer. The copy on output can’t be
      eliminated except in the I/O callback case (when
      nice_agent_attach_recv() has been used), in which case the callback
      could be invoked with a pointer directly into the pseudo-TCP receive
      In the non-reliable agent case, zero memcpy()s are used.
      A couple of the more complex socket implementations (TURN and HTTP) have
      slow paths during setup, and partially also during normal use. These
      could be optimised further, and FIXME comments have been added.
    • Philip Withnall's avatar
      socket: Add vectored I/O support for receiving on sockets · dfab04cd
      Philip Withnall authored
      Replace the recv() API with a recv_messages() API, which supports
      receiving multiple messages, each with multiple buffers rather than a
      single monolithic buffer.
      This doesn’t break API, as the socket API is not exposed outside
      libnice. It does introduce a new struct: NiceInputMessage, which is
      analogous to struct mmsghdr.
      This includes updates to the test-bsd test to cover the changed API.
    • Philip Withnall's avatar
    • Philip Withnall's avatar
    • Philip Withnall's avatar
      agent: Add a nice_agent_recv_nonblocking() function · 6d3a32a0
      Philip Withnall authored
      This is a non-blocking variant of nice_agent_recv(), and will be used
      internally by the GPollableInputStream implementation. External
      implementations may use it as well.
      It reserves the right to iterate the main context, but doesn’t currently
      do so.
    • Philip Withnall's avatar
      agent: Add nice_agent_build_io_stream() API · 11f04d6c
      Philip Withnall authored
      This allows creation of a NiceIOStream from an existing NiceAgent
    • Philip Withnall's avatar
      agent: Add support for GIO-style I/O streams · 949f979a
      Philip Withnall authored
      This adds three new classes:
       • NiceIOStream
       • NiceInputStream
       • NiceOutputStream
      which allow wrapping a single stream/component pair in an I/O stream
      which can be used with the standard GIO functions.
      The streams are constructed as wrappers around a NiceAgent, with changes
      to the NiceAgent’s properties affecting all instantiated streams.
      Streams are only supported for reliable connections.
      If the NiceAgent stream which underlies a NiceInputStream,
      NiceOutputStream or NiceIOStream is removed, the I/O stream is marked as
      This is based on work originally done by Youness Alaoui
    • Philip Withnall's avatar
      agent: Add a nice_agent_send_full() API exposing error information · 5d63de5a
      Philip Withnall authored
      This adds GError and GCancellable parameters to the existing
      nice_agent_send() API, and is identical in all other respects (notably,
      it is non-blocking).
      The GCancellable is currently unused, but could be used in future if the
      API grows to support blocking writes.
      The GError is used to return more interesting error codes than just
    • 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.
    • Olivier Crête's avatar
      agent: Don't make relayed sockets available in nice_agent_get_selected_socket() · 42358dde
      Olivier Crête authored
      Also document that fact.
  2. 27 Jan, 2014 1 commit
  3. 18 Dec, 2013 1 commit
  4. 20 Nov, 2013 1 commit
  5. 30 Oct, 2013 1 commit
  6. 23 Feb, 2013 1 commit
  7. 05 Feb, 2013 2 commits
  8. 02 Feb, 2013 2 commits
  9. 01 May, 2012 1 commit
  10. 19 Jan, 2011 2 commits
  11. 01 Oct, 2010 2 commits
  12. 29 Sep, 2010 1 commit
  13. 23 Aug, 2010 1 commit
  14. 20 Aug, 2010 1 commit
  15. 20 Jul, 2010 1 commit
  16. 19 May, 2010 1 commit
  17. 18 Mar, 2010 1 commit
  18. 16 Feb, 2010 4 commits
  19. 04 Nov, 2009 2 commits
  20. 28 Jul, 2009 2 commits
  21. 27 Jul, 2009 1 commit