Hi, I’m developing a DDP client for KMP. I’m trying to understand the message format of DDP.
a["{\"msg\":\"ping\"}"]
what does “a” mean?. There are also b, c, and o messages. (a seems to be a relevant json object after removing the escaping characters) Why the rest is between array brackets?
I also examine other clients like meteor-react-native but they seem to ignore those and directly parse to json when needed.
I don’t think your messages are what the protocol actually uses. I am using a forked version of a Unity DDP client, which uses message tokens as described in the specs. Maybe you can use it as a reference (but beware, it doesn’t cover all side edges, so I had to apply some patches):
Hi, in your example the DDP message is encapsulated by SockJS.
Literally your example corresponds to an array (‘a’) containing a single JSON-stringified DDP message.