Implement socket_export_stream()