Skip to main content

read_line

Function read_line 

Source
pub fn read_line(blocking: bool) -> Option<MArray<u8>>
Expand description

Read a single line from io::stdin with library buffering

In a speech-dispatch module using the libspeechd_module library the standard input is managed by library which uses its own input buffering. You must therefor use this function instead of the functions of io::stdin when directly reading server commands to avoid protocol errors due to partial reads ending up in the wrong buffer.

If blocking is true, this will wait for new input otherwise it will return None if no input is available.

The response will include the trailing newline.