Open mike-aungsan opened 9 years ago
Unfortunately there is no support for rooms and broadcasting for now.
Many Thanks for info.
From server to client(s) in the room, I can send file as regular msg. Would it be much different with sending as stream?
I would very much so like to see this. If a bunch of users are interracting in an infinite procedurally generated world, it would be useful to just stream the updated terrain data to the whole room instead of iterating through each clients client_socket obj.
Any update? 🙂
Client/Browser upload file with file event. ss(socket).emit('file', stream, {size: file.size, name: file.name})
Then I can pipe back to the client from server. ss(socket).on('file', function (stream, data) {
var outStream = ss.createStream() ss(socket).emit('file', outStream, data)
//outStream.pipe(stream) // this is wrong stream.pipe(outStream) })
But I want to sent it to the room. For example, send msg to the room with socketio / sio sio.sockets.in('roomName').emit('msg', JSON.stringify(msgObj))
How can I sent stream to the room?
Regards,
Mike
Ref: http://stackoverflow.com/questions/10058226/send-response-to-all-clients-except-sender-socket-io