[Spice-devel] [spice-server 1/3] reds-stream: Introduce reds_stream_set_no_delay() helper

Christophe Fergeau cfergeau at redhat.com
Thu Mar 9 10:55:52 UTC 2017


On Thu, Mar 09, 2017 at 05:37:06AM -0500, Frediano Ziglio wrote:
> > 
> > The code to enable/disable on a TCP socket is duplicated in multiple
> > places in the code base, this commit replaces this duplicated code with
> > a helper in RedsStream.
> > ---
> > 
> > This patch has already been sent a few times with various variations around
> > bool/gboolean/true/TRUE. I'd like to stick with things as they are in this
> > patch now as this is consistent with the rest of the reds-stream.c code.
> > 
> 
> I would prefer to have a patch to fix the incoherences in reds-stream.c
> before.

I have such a patch queued, but it comes after this series, and
I don't really think it's worth rebasing things so that bool comes first
as long as both issues are fixed in the next days.
> 
> But beside this I think these function would be better into a new file
> dealing with lower level sockets instead of RedsStream.

That's a good point, red-socket.c? Though if it grows too close to
GSocket, I'd probably just use that.

> Setting these features on the stream make the function less reusable.
> For instance the keep alive setting could be even moved to spice-common
> and reused in the client code.

The client already uses GSocket for most of this, I don't think it would
have a use for such an API.

> And for instance you can set no blocking on socket before creating
> the RedsStream.

This would make this possible yes, though in this case this did not seem
that important.

I'll drop this series then, and see how to do it differently ;)

Thanks,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170309/57d2e5f5/attachment.sig>


More information about the Spice-devel mailing list