stream for socket.io