自己写的服务端接受数据有断包的情况是怎么回事呀?
char buf[307200];
int nNetTimeout = 3000;
int ret = setsockopt(clientSocket, SOL_SOCKET, SO_RCVTIMEO, (char *)&nNetTimeout, sizeof(int));
int bytes = recv(clientSocket, buf, sizeof(buf), 0);
buf[bytes] = '\0';
strTmp = buf;
离线