[−][src]Function gpsd_proto::handshake
pub fn handshake<R>(
reader: &mut dyn BufRead,
writer: &mut BufWriter<R>
) -> Result<(), GpsdError> where
R: Write,
Performs the initial handshake with gpsd
.
The following sequence of messages is expected: get VERSION, set WATCH, get DEVICES, get WATCH.
Arguments
debug
- enable debug printing of raw JSON data receivedreader
- reader to fetch data fromgpsd
writer
- write to send data togpsd
Errors
If the handshake fails, this functions returns an error that indicates the type of error.