Network: add control over buffer size to socketToStreams.