cURL / Mailing Lists / curl-library / Single Mail


telnet (was Re: Which timeout expired? CURLOPT_TIMEOUT or CURLOPT_CONNECTTIMEOUT?)

From: Dan Fandrich <>
Date: Mon, 21 Mar 2011 23:44:55 -0700

On Tue, Mar 22, 2011 at 11:53:57AM +0530, chirayu joshi wrote:
> I am trying to make an application in C which must establish a telnet
> session
> with a remote server, execute some scripts on the remote server and close
> down
> the telnet session.

What does this have to do with CURLOPT_TIMEOUT or CURLOPT_CONNECTTIMEOUT?
Nothing. Please don't hijack somebody else's e-mail thread.

> I have had a look at libcurl since it supports several protocols, but I
> haven't been
> able to figure out if I can use libcurl for the purpose described above.
> Any suggestions to what I could do?

Start by reading the libcurl documentation. There are quite a few
mentions of telnet in there.

> The application must be programmed in C and the telnet session has to be
> controlled from the same C-application.

Yes, you can do this with libcurl. telnet is a bit of an oddball compared
to the other protocols supported by libcurl as the client must communicate
over stdin/stdout instead of using function callbacks, but it's certainly

> Can anyone provide a simple telnet client program so as to refer.

There isn't one included in the libcurl sources. If you come up with one,
I'm sure we'd be happy to includ it in future releases.

>>> Dan
List admin:
Received on 2011-03-22