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

the text still needs to be updated though (also the part that talk about crate, as we don't use it anymore)