I'm using Cap'n proto to send and retrieve messages between multiple clients and my websocket server.
Since I have only one websocket channel to send and receive data and various type of messages can be sent, I need a way to distinguish between then when trying to decode it.
How can this be done correctly in Cap'n proto?
I think this question is language agnostic, but if a language is needed, I have my server in Rust and clients in Rust, Go and Javascript, so a solution that works in all these languages would be much appreciated.