c/c++ - safest way to send time_t over socket

前端 未结 4 1740
暖寄归人
暖寄归人 2021-02-20 11:47

I\'ve set up a C++ server/client environment, and am trying to send a time_t value from the server to the client (an useful thing in any server). But I\'m coming accross a heada

4条回答
  •  走了就别回头了
    2021-02-20 12:08

    You could send it in textual form, with a fixed number of digits. Then you don't have to worry about signs, size incompatibilities, or even byte order.

提交回复
热议问题