You need to design an application layer protocol which is understood both by server and client systems.