tcp: make tcp streams readable/writable via API