a question about using libcurl two threads
Date: Wed, 08 Sep 2004 10:36:58 +0800
Now i am testing to use libcurl(curl-7.12.0 ) and i am wonder whether libcurl can support the followings,
anyone presents me explanation or example is appreciated.
I want to design a communication module to transfer messages between a TCP side and a http server.
I will create two threads. One thread's function is to send the message which got from the TCP side to the http server
whenever my module got them. The other thread will keep receiving the response messages from the http server.
So , i wonder whether libcurl api can support the nonblocking sending and use the similar method like select
to receive the response message from the httpserver.
I want to adopt this kind of mechanism since maybe there are many TCP messages got at the same time
and my module should send them out to the corresponding HTTP server one by one without blocking to
receive any of the response. Then i use another thread to do the receiving job which avoid blocking
others' sending when any one or more of the HTTP server response slow or timeout.
Received on 2004-09-08