I wish to handle incoming streaming data. Say through Twitter API. I am using libcurl and I have implemented the libcurl library usage correctly. The API is sending continuous stream of data (characters) and libcurl allows you capture the data in terms of strings which can then be put through a parser.

The problem is that libcurl presents the data in chunks and I am only able to parse the data in chunks. What I am really after is a way to capture/handle the characters as they are being received.

What is the best way to implement this? This is analogous to a client at the end of a socket.