Encoding, decoding an integer to a char array

后端 未结 10 2284
借酒劲吻你
借酒劲吻你 2021-02-06 19:44

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array?

I was looking for an answer but didn\'t get a

10条回答
  •  庸人自扰
    2021-02-06 20:30

    At least to be portable you should think about possible different byte order on encoding.

    Do you really need to implement new networking messaging protocol? Don't NASA IPC or Sun RPC suit you? They both are stable enough, NASA is simpler to startup, RPC seems available more widely (yes, it is ready to use and library is available for most popular systems).

    • For RPC try 'man rpc'
    • For NASA IPC look here

提交回复
热议问题