Re: use gio with serialport



Il Tue, 23 Sep 2014 15:48:45 +0800 Matrix <zhangcheng cgmobile com cn> scrisse:

the qustion is how read the buf as line by line ?
...
and then i use g_buffered_input_stream_set_buffer_size to change the 
buffer size to 1 byte

Hi,

if you are looking for a 1 byte termination (as you are when reading
line by line) you must read 1 byte at a time: I don't see any other way
around (apart playing with timeout settings).

it works, but it should be not efficient

This is a non-issue, especially when serial communications are involved.

Ciao.
-- 
Nicola


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