简体   繁体   English

通过套接字发送C结构的目的是什么?

[英]What is the purpose for sending C struct over socket?

I am currently doing a socket programming that involves sending c structs over the socket. 我目前正在做一个套接字编程,涉及通过套接字发送c结构。

But coming to think of it, what would be the purpose of sending the struct for? 但是考虑一下,发送该结构的目的是什么?

this is a going to be implemented for networking module for client and a cloud database. 这将为客户端和云数据库的联网模块实现。

因为远程套接字可以轻松地将字节解析为结构并使用它,这就是为什么,而不是逐字节读取字节并进行转换

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM