I'm currently working on a C application sending message to a Meteor server over websocket. I'm using jansson for JSON conversion and nopoll as websocket library.
Everything is working fine in both way (sending / receiving) except when I try to send very large messages (about 15 000 000 characters). I think (I'm not sure) that the message is sent to the server so the nopoll library should not be the source of the issue. But, I'm sure that the message is not treated by Meteor as he should be, because the method (RPC) is never called.
I found that the websocket limitation is equal to the maximum value of a 64-bit unsigned value so this shouldn't be the problem.
On the other hand, I didn't found the maximum length for a DDP message even in the DDP specification.
Have you any idea of the DDP limitation or other parameters that I didn't think about ?
As I was working on an architecture where the client and the server was on the same machine, I was not limited by the network. I think I was pushing too much informations too fast, and the socket was simply full of data.
The solution is simple : cut the data in several fragments as LPs suggests and implement flow-control.
I also found the Mongo C driver that could be another solution because I should be able to push data directly on the database as suggests Mikkel.
Thank you both for your help.