标签:
直接发送和接收结构体,例如:
struct A {...};
struct A objectA;
发送的时候:
tcpSocket->write((char *)&objectA, sizeof(objectA));
接收的时候:
struct A objectB;
tcpSocket->read((char *)&objectA, sizeof(objectA));
http://blog.csdn.net/emdfans/article/details/23869325
标签:
原文地址:http://www.cnblogs.com/findumars/p/5599440.html