[Spice-devel] [spice-gtk Win32 v3 02/12] NamedPipe: spice_named_pipe_new: add param to distinguish Server or Client

Marc-André Lureau marcandre.lureau at redhat.com
Thu Jun 28 04:38:12 PDT 2012


El jue, 28-06-2012 a las 14:27 +0300, Uri Lublin escribió:
> > Are you sure you need namedpipe object for that?
> >
> > I think you could have used regular GWin32InputStream GWin32OutputStream..
> >
> > (that was my initial design, iirc)
> 
> I'm not sure I really need a namedpipe object.
> It's one way to implement it, using NamedPipe and NamedPipe connection 
> and GIOStream.
> Does GWin32InputStream/OutputStream better ?  In what way ?

GWin32InputStream/OutputStream are used by the NamedPipeConnection.

The difference is GWin32IOStream is more generic, as it can take any
handle. This allows you to create it any way you want (though it should
be at least OVERLAPPED to be really async, iirc)

> Note that the NamedPipe class was only acting as server.
> These first two patches implements a NamedPipe client.

Yeah, I think it was made like this by design. In fact, I think it
should be a private object to NamedPipeListener.

I would avoid reusing NamedPipe for clients. It shouldn't be difficult
to change, sorry for not noticing that before.



More information about the Spice-devel mailing list