curl-library
[hiper] callback wouldn't be call at write state
From: Alexander Lazic <al-curllibrary_at_none.at>
Date: Wed, 9 Aug 2006 15:47:29 +0200
Date: Wed, 9 Aug 2006 15:47:29 +0200
Hi,
i have wanted to make some little tests with the *new* multi-interface
and was a little bit suprised about some behaviour.
I haven't see a call with CURL_POLL_OUT of the socket_callback()?!
I have compiled the current-cvs version with debug and have seen that
the write of the request go thru without to call the callback.
I have reused the hipev.c from daniel, you can get the modified file
from http://none.at/al-hipev.c
Please tell me if i overseen something or misunderstand something and
the behaviour worked as designed.
Regards
Aleks
#####################
Here now the output from std(out|err):
--- ./al-hipev 1 1 About to do 2 connections * STATE: INIT => INIT handle 0xa0046bc: * STATE: INIT => INIT handle 0xa00cc84: timer start() * STATE: INIT => CONNECT handle 0xa00cc84: * STATE: INIT => CONNECT handle 0xa0046bc: * About to connect() to 127.0.0.1 port 8081 * Expire at 1155131497 / 497842 (300000ms) * Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8081 * STATE: CONNECT => DO handle 0xa00cc84: * About to connect() to 127.0.0.1 port 8081 * Expire at 1155131497 / 498520 (300000ms) * Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8081 * STATE: CONNECT => DO handle 0xa0046bc: > GET /1001 HTTP/1.1 Host: 127.0.0.1:8081 Accept: */* * STATE: DO => PERFORM handle 0xa00cc84: > GET /1000 HTTP/1.1 Host: 127.0.0.1:8081 Accept: */* * STATE: DO => PERFORM handle 0xa0046bc: socket 6 easy 0xa004734 what IN Add info for socket 6 READ addsock() for fd 6 with action IN >>>> setsock() event_add() IN for fd 6 socket 7 easy 0x9ffc194 what IN Add info for socket 7 READ addsock() for fd 7 with action IN >>>> setsock() event_add() IN for fd 7 main() call update_timeout() update_timeout set EVENT callback type READ < HTTP/1.1 200 OK < Server: nginx/0.3.56 < Date: Wed, 09 Aug 2006 13:46:37 GMT < Content-Type: application/octet-stream < Content-Length: 512 < Last-Modified: Wed, 09 Aug 2006 10:44:56 GMT < Connection: keep-alive < Accept-Ranges: bytes writecallback() 00: 512, total 512 * STATE: PERFORM => DONE handle 0xa0046bc: * Expire cleared * Connection #0 to host 127.0.0.1 left intact * STATE: DONE => COMPLETED handle 0xa0046bc: socket 7 easy 0x9ffc194 what REMOVE <<<remsock() removed 7 running_handles: 1 eventcallback() call update_timeout() on fd 7 update_timeout set EVENT callback type READ < HTTP/1.1 200 OK < Server: nginx/0.3.56 < Date: Wed, 09 Aug 2006 13:46:37 GMT < Content-Type: application/octet-stream < Content-Length: 512 < Last-Modified: Wed, 09 Aug 2006 10:45:15 GMT < Connection: keep-alive < Accept-Ranges: bytes writecallback() 01: 512, total 1024 * STATE: PERFORM => DONE handle 0xa00cc84: * Expire cleared * Connection #0 to host 127.0.0.1 left intact * STATE: DONE => COMPLETED handle 0xa00cc84: socket 6 easy 0xa004734 what REMOVE <<<remsock() removed 6 running_handles: 0 last transfer done, kill timeout 1 => (0) 1 => dlcounter 512 0 => (0) 0 => dlcounter 512 * Closing connection #0 * Closing connection #0 Total time: 19049us ---Received on 2006-08-09