mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
update receive
This commit is contained in:
parent
fbbcfbdec7
commit
38af4a5fb6
@ -78,7 +78,7 @@ namespace Husky
|
|||||||
{
|
{
|
||||||
char recvBuf[RECV_BUFFER_SIZE];
|
char recvBuf[RECV_BUFFER_SIZE];
|
||||||
int n;
|
int n;
|
||||||
while((n = recv(sockfd, recvBuf, RECV_BUFFER_SIZE, 0)) > 0)
|
while(!httpInfo.isBodyFinished() && (n = recv(sockfd, recvBuf, RECV_BUFFER_SIZE, 0)) > 0)
|
||||||
{
|
{
|
||||||
if(!httpInfo.isHeaderFinished())
|
if(!httpInfo.isHeaderFinished())
|
||||||
{
|
{
|
||||||
@ -86,11 +86,6 @@ namespace Husky
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
httpInfo.appendBody(recvBuf, n);
|
httpInfo.appendBody(recvBuf, n);
|
||||||
if(!httpInfo.isBodyFinished())
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if(n < 0)
|
if(n < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user