Re: read function callback problem while processing telnet:// URL
Date: Wed, 16 Jan 2002 09:40:47 +0100 (MET)
On Tue, 15 Jan 2002 Ondrej_BOSIK_at_tatrabanka.sk wrote:
Please don't take this thread off the mailing list. This is CC'ed back to the
list. Keep follow-ups there.
> well, I'm not successfull passing data on stdin either. I've tried
> user pipe, I've tried redirecting stdin from the file via the freopen()
> system call, by nothing helps ! It just waits for input from the keyboard.
> What exactly do you mean by "standard input" ? Because it seems like the
> keyboard was the only recognized input. A can't imagine, how it is done.
Well, have a peek in the code and you'll find out what stdin means. libcurl
reads data from file descriptor 0, that's stdin.
The problem with the libcurl code is that while it runs, your program won't
be able to do anything. curl_easy_perform() runs until its done.
> As to the telnet main loop, I do not have a clear idea about it yet
> but I'll think about it and let you know (if it will be worth to) 8-).
You find the libcurl telnet network loop in lib/telnet.c. The non-Windows
version starts at around line 1150.
> Hm, I'm still thinking about it but I hope, YOU will tell me something
> about inputting data. Looking forward your response !
I haven't come up with a good way how the application should write data to
the remote side. libcurl could possibly call the application periodly to ask
if there's anything to pass to the server, but I don't think that is a very
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-01-16