re #72, updated code on chapter6 as DuplexStream is deprecated
Merge pull request #75 from allan-simon/change_code_chapter_6_to_rust_0.11

re #72, updated code on chapter6 as DuplexStream is deprecated