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
Post a Comment