cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: c++ libcurl: telnet

From: Gary Maxwell <gmaxwell_at_casabi.com>
Date: Wed, 28 May 2008 15:42:38 -0700

Julius Morales Reolizo wrote:
>
> Gary Maxwell wrote:
>
>> The behavior you are seeing is reproducible when libcurl is built
>> against WinSock/Win32. This is because inside telnet_do(), the read
from
>> stdin is performed with the Win32 ReadFile() function, which blocks.
>> This prevents the display of incoming data from the server until the
>> ReadFile() completes, because telnet_do() handles both input and
output
>> streams.
>>
>> Can you confirm what your libcurl build environment is, please?
>
> I'm working on linux based system.

I'm afraid I don't have a linux environment to play with. If you've
looked at telnet.c, you will see how the telnet_do() function is
partitioned into separate code streams for Winsock/Win32 and everything
else. I won't speculate on whether the issue is the same as it is for
Winsock/Win32, maybe you can check it out with a debugger, or someone
else on the list knows what's going on.

I tried coming up with a non-blocking version for Winsock/Win32, but
it's not working yet, and it will still be stupidly simple (as far as
console-based telnet clients go); nevertheless, it would be an
improvement.

> Thanks for the time.
>
You are very welcome!

-Gary
Received on 2008-05-29