Re: c++ libcurl: telnet
Date: Tue, 3 Jun 2008 12:04:46 -0700
On Tue, Jun 03, 2008 at 12:55:07AM -0700, Julius Morales Reolizo wrote:
> With the new code for telnet in http://curl.haxx.se/mail/lib-2008-06/0016.html
> can I address the missing last line a telnet site like rainmaker.wunderground.com
> ahh... rewriting the telnet_do function on a guy like me doesnt really help...
> cause I really dont get the code... struct after struct on different files...
> I admit I dont have the knowledge of understanding it... pls help us newbies like me
> furthermore, I really could not pass a command to libcurl.
> how can I automate the commands on telnet (I tried pipes and redirection, and since I'm a newbie)
> nothing works. everybody say pass it to stdin but I think I can't get their point...
> if i can see some snippet it could really help...
If you're writing your own program using libcurl and you want to supply the
data to send from within your program, the most straightforward way to do
this is to split your program into two processes with fork(). The first
process creates a pipe and ties it stdin, then forks a new process and
passes it the other end of the pipe. The first process calls
curl_easy_perform while the second process writes the data to send into the
pipe, which ends up on stdin in curl in the first process.
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-06-03