Write a buffer to the byte stream.
fn write(&mut self, buf: &[u8]) -> Result<usize, Errno>
The buffer to be written.
Returns the total number of bytes written.
The default implementation calls gather_write with a single buffer.
gather_write