summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-01-16 16:06:30 +0000
committerOlivier Crête <olivier.crete@collabora.com>2014-01-31 01:49:07 -0500
commit253be34806bee232df55f2a92609f74a015797da (patch)
treed87125595c38a584ee7a422d9290245a30dadaab /docs
parent9661150dcda7939d108e583e7681352f99e581c8 (diff)
downloadlibnice-253be34806bee232df55f2a92609f74a015797da.tar.gz
agent: Add support for vectored I/O for receives
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 untouched. 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 buffer. 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.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/libnice/libnice-sections.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/reference/libnice/libnice-sections.txt b/docs/reference/libnice/libnice-sections.txt
index 586e5cf..e8fb305 100644
--- a/docs/reference/libnice/libnice-sections.txt
+++ b/docs/reference/libnice/libnice-sections.txt
@@ -26,7 +26,9 @@ nice_agent_get_selected_pair
nice_agent_send
nice_agent_send_full
nice_agent_recv
+nice_agent_recv_messages
nice_agent_recv_nonblocking
+nice_agent_recv_messages_nonblocking
nice_agent_attach_recv
nice_agent_set_selected_pair
nice_agent_set_selected_remote_candidate