curl-library
libcurl in a comet connection
Date: Fri, 4 Mar 2011 20:00:29 +0900
hello,
Is there anyone ever used libcurl to implement a comet client?
I have a problem that the memory usage of my application increases continuously, untill the comet connection is closed, app exits or out of memory.
My application connects to a comet server through https, and the connection keeps open forever, untill an error occurs, or the application exits. The server then push data realtimely to my application.
It seems that all the received data was cached in memory by libcurl, and the data will not be freed untill the curl handle is cleanup.
I first implemented my application using wininet, wininet seems to cache all received data in memory untill a whole https response is recevied. Because a comet connection never closes, wininet will never get a whole https response, and it eventually runs out of memory.
So I switched to libcurl hope the problem could be resolved, but libcurl seems to have the same problem.
Is there anyone can help me?
any feedback is appericiated.
rgds,
chou
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-04