curl-users
Re: Telnet under win32
From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Wed, 4 Jul 2001 21:41:30 +0200
Date: Wed, 4 Jul 2001 21:41:30 +0200
> On Wed, Jul 04, 2001 at 07:52:04PM +0400, SM wrote:
> : Hi,
> :
> : I patched the telnet.c code to fix Telnet under Win32 (see telnet.c.diff
> : attachment). The new select loop (under win32) polls the keyboard buffer
> : every 500 milliseconds and read in a character.
>
> usec = microsecond. 0.5 seconds between each poll would be annoyingly
> slow I think.
>
Yep. I had the same idea at first, but I didn't want to use valuable CPU
time just for polling stdin for every select() timeout.
I like the WaitForMultipleObjects() approach better. It is of course a
bigger change, but it feels like it is more the Win32 way of doing it.
/Linus
Received on 2001-07-04