I want to build an MVC web application using sails.js.
I also want to have a mobile app and desktop client to connect to my web app. For connecting the mobile client I want to use socket.io
since it gives realtime capabilities to it.
How should I connect the client to the server?
I tried a socket connection from android client to one of the routes
in my sails application and I got an error saying the connection had no cookies.
I remember in the past when I wanted to connect my desktop client to my Django app I got an error saying no POST possible when no csrf.
So my question is what is the right way of doing that? Should I send cookies to my mobile app? I don't think cookies are the clean way of doing this.
And what protocol should I use? Telegram uses MTProto. Should I implement something like that?
And where in an MVC web framework should I be listenig to and handling connection(s) from mobile and desktop clients?
For my app imagine an online store that also has social network capabilities and users can comment on store items from their phone client.