Adds automatic detection of readable/writable/duplex stream