c++ - Best practise: Sending typed data over TCP -


i want implement server has few methods 1 accepts array of two-dimensional points (a struct). i'm wondering if should implement webservice or simple tcp socket.

the target system c++ running on debian linux. far understanding goes, webservice based on xml/soap , can use interface including datatypes on other client system. contrary, plain tcp socket reading byte arrays. there easy way achieve kind of typed data transfer tcp sockets don't need webserver running webservice?

here c# example interface of server should like:

public interface iservice {     void closeshutter();     bool writeframe(point[] frame, bool repeat);     maintenanceinfo getmaintenanceinfo(); }  public struct point {     public float x { get; set; }         public float y { get; set; }     public float z { get; set; }     public int color { get; set; }     public bool draw { get; set; } }  public struct maintenanceinfo {     public uint lifetime { get; set; }     public bool usedhours { get; set; } } 

thanks advise.

matthias

you can use xml-rpc c++ : http://xmlrpc-c.sourceforge.net/


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -