Using websockets with node.js

I send a request to the server, which launches creating files there, then client gets a response and creating files proceeds. Then websocket is used to message client about progress. I try to send a message after every file created. Client gets first message but then doesn’t while other files are being creating. Is this because of quantity of messages?

I suppose to send message not for each file, but, for example, for each 10th or 20th, or make a delay there. So I’d like to ask skilled colleagues how to do it properly?