Re: win32 and glib, socket data inaccessible

On Fri, Jul 01, 2005 at 07:34:56AM +0200, Marc Lehmann <gtk-perl schmorp de> wrote:
Digging some more, it seems one can distinguish between the two by:

        io = GvIO(gv);
        if (io && IoTYPE(io) == IoTYPE_SOCKET) {

Actually, why distinguish them? It's not valid to call add_watch with a
file handle, only with sockets, under most os'es, and...

ah, no, also with pipes (oops, I wonder whta glib will do with pipes -
likely it doesn't work because it tries to buffer them).

But as it is broken anyway I guess it's quite unnecessary to support anythig
besides sockets there, except maybe for an error message if you pass in the
wrong kind of handle.

                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      pcg goof com
      --==---/ / _ \/ // /\ \/ /
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]