Creates a duplex stream