Re: g_io_channel and UDP sockets

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

 



On Tue, Feb 24, 2004 at 08:07:11PM +0100, Sven Neumann wrote:
> > I get this by calling
> > 
> >     GError *err;
> >     iostat = g_io_channel_read_to_end(source,  &str_return, &length, &err);
> 
> Read the docs on GError, you need to initialize the err variable to NULL.

Thanks, I had misread that part.  That fixes the error messages.


> > I note that in blib you do the same work-around I had settled on:
> > 
> >     req_fd = g_io_channel_unix_get_fd (io);
> >     buf_read = recvfrom (req_fd, buf, sizeof (buf), 0,
> >                         (struct sockaddr *) &req_addr, &req_addr_length);
> 
> I don't see this as a workaround.

It's not so bad, I was just hoping to limit a bit more how much of my
code knew this was a UDP socket.  As soon as I grab the fd and call
recvfrom, I'm using that knowledge.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux