vectored g_io_channel_[read|write]_chars?



In the netperf4 code I'm porting-over to glib, it used to call sendmsg with a two entry iovec - the first entry was the message length, and the second was the message body. The reason to use sendmsg was to present logically associated data to the transport at the same time, as one really should (must) do for efficient networking. Setting TCP_NODELAY is just a kludge.

At first I figured "Ok, no vectored operations, but there are buffered operations and I suppose I can live with the extra copies and having to flush" but I have a question - on Windows a channel is made non-blocking when a watch is set (IIRC) - are there any other "gotchas" related to that that might make writing unbuffered as well? I _really_ don't want the message length going-out separately from the message body... it may not matter all that much for file I/O, but in networking that is doubleplusungood.

sincerely,

rick jones



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