Function hi_tension::hiread[][src]

pub fn hiread<S: Read + Write>(stream: &mut S) -> Result<Vec<f64>>
Expand description

Read a High Tension Message from the stream.

This function is blocking.

During operation, this function allocates space greedily by doubling buffer size each time more space is needed. Since message size is unknown, this minimize the number of allocations required, but may induce excessive RAM consumption. Extra space is released when the function returns.

Examples

Basic usage:

use std::net::TcpStream;
let stream = TcpStream::connect("127.0.0.1:34567")

let data = hiread(&mut stream);