I am building a professional iOS application where an iPad is a server and several iPhones are clients.
Considering the fact that :
– communications operate only on a local network via sockets using TCP.
– I want to keep all of them in sync (all devices have a local database)
– I want to be able to send commands like NEW, UPDATE, DELETE, etc to keep them in sync
– I want be able to send notifications with some data attached (audio file),
– I want to define priorities for all of theses commands.
It makes me think that a need to define a protocol, so my question is : Does one already exist ?
Thanks a lot !
You can listen socket messages, server can send simple structs with data url, commands to clients, and after that they can update data for example:
and in socket if you will get header with cmd = 1, you can send NSURLconnetion with url to your server and download some data and sync it.