- 31 Jan, 2014 10 commits
-
-
Olivier Crête authored
It was used correctly only half the time anyway
-
Olivier Crête authored
We never send multiple messages to separate targets in practice, so this will simplify the code
-
Philip Withnall authored
Add one new public function, nice_agent_send_messages_nonblocking(), which replaces nice_agent_send_full(). This isn’t an API break, because nice_agent_send_full() hasn’t been in a release yet. The new API allows sending multiple messages in a single call, and supports vectors of buffers to transmit the messages from. The existing nice_agent_send() API has been left untouched, although it’s a bit of a bugbear because it’s non-blocking and doesn’t fit with the new *_nonblocking() naming scheme. Oh well. This doesn’t bring any notable changes to the number of memcpy()s on the critical path: it remains at zero for the common cases and common socket types. It introduces the possibility for future work to eliminate some memcpy()s in more complex socket types, like tcp-turn and tcp-bsd, but these optimisations have not been made yet. FIXME comments have been added. This includes modifications to the test-send-recv unit test to cover the new API.
-
Olivier Crête authored
-
Olivier Crête authored
-
Olivier Crête authored
So instead of actually blocking on the FD, block on a GCancellable which is triggered when the writable callback is called. Also set the application's GCancellable as a child of this source.
-
Olivier Crête authored
Otherwise it produces a deadlock
-
Olivier Crête authored
There was a possible race between disconnection and freeing of the WriteDatas structure, now it's ref-counted so it can never happen. Also set the len to -1 if the cancellable was cancelled.
-
Philip Withnall authored
-
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 closed. This is based on work originally done by Youness Alaoui <youness.alaoui@collabora.co.uk>.
-