curl-users
Re: Telnet under win32
Date: Fri, 06 Jul 2001 02:24:01 +0400
Hi,
At 21:25 05-07-2001 +0200, Linus Nielsen Feltzing wrote:
>Very true. I was very reluctant too, but I couldn't find a better solution.
>Yours is as good as any other, but it has a major drawback. It is assuming
>that stdin comes from the keyboard. If you pipe into stdin it will not work.
Yes, I was thinking of a way around that. The patch I posted does not
verify whether stdin has been redirected. I implemented the change to get
Telnet working on Win32. Now that there is a fix, we can look into stdin
redirection.
>I can't really figure out a way to poll a stdio stream in Win32 without
>blocking. Can you?
You can use a asynchronous ReadFile call or else peek into the console to
see whether there is any input waiting. Alternatively, you would read the
stdin from a separate thread.
Regards,
-sm
Received on 2001-07-06