[gnet] GUnixSocket unbuffered?



 Folks,

   I'm writing an application which captures realtime data at a rate
of roughly 100 KB/sec and attempts to write it through a UNIX socket
to another process.  It appears that this socket may be blocking in
such a way that it is causing the application to hang up.  I've been
snooping through the gnet code and it appears that the GIOChannel in
GUnixSockets is set by default to be unbuffered.  Am I correct in
thinking this?  If so, will it break anything to explicitly set it
to be buffered and increase the buffer size to something like 100K
or so?

   I'm coding under Linux, 2.4.26 kernel, glib 2.4.4, gnet 2.0.5.  I
can provide code snippets if needed, but the writing code is really
just a call to g_io_channel_write_chars with packets of 50-1000 bytes
of data at a time.  Pretty vanilla stuff.

thanks,
Jim




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