|
From: | N.Karakotas |
Subject: | [lwip-users] netconn_recv partial data |
Date: | Fri, 20 Jan 2012 22:00:18 +0200 |
Hello,
Im trying to receive an image from an IP camera but im having a problem
receiving data. I successfully connect and access the camera and I then try to
get the data.
I receive the header response such as:
HTTP/1.0 200 OK
Date: Fri, 20 Jan 2012 21:50:41 GMT
Server: Mbedthis-Appweb/2.4.2
Content-type: image/jpeg
Last-modified: Fri, 20 Jan 2012 21:50:41 GMT
ETag: "32c-3142-58078"
Content-length: 208451
Connection: keep-alive
Keep-Alive: timeout=10, max=1000
\323?\374\360
All I receive is 256 bytes of data and once the loop executes again it has
no data. Below is the code:
inbuf = netbuf_new ();
err_t resp =
OpenHTTPSocket(conn,netif_eth0,method,url,header,auth);
/* Get the response */
if(resp == ERR_OK){
memset(httpBuf,0,BUF_SIZE);
while((resp =
netconn_recv(conn,&inbuf) ) == ERR_OK){
netbuf_first(inbuf);
do{
netbuf_data(inbuf, (void*)&data, &buflen);
printf("%s\r\n",data);
}while(netbuf_next(inbuf) >= 0);
}
printf("%d\r\n",resp);
}
netbuf_delete(inbuf);
netconn_close(conn);
return ERR_OK;
#define
PBUF_POOL_SIZE 8
#define PBUF_POOL_BUFSIZE 512
Does anyone know why this is happing? Any place to look? lwip versio
1.4.0
Regards,
Nick |
[Prev in Thread] | Current Thread | [Next in Thread] |