serversocket和clientsocket SendBuf的问题
typedef struct TFileData//发布包的长度
{
CHAR command[30];
CHAR password[20];
CHAR info[255];
int position;//当前传输的次数
short length;//当前传输的长度
int width;//文件的实际长度
CHAR filedata[4096];//文件包
}TFileData;
ServerSocket1->Socket->Connections[0]->SendBuf(&dp, sizeof(dp));
这个结构是4416个字节
int tsize = Socket->ReceiveLength();
为什么接收后就只有4320个字节?
这样filedata[4096]会丢失96个字节,这是什么原因?