From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA26330; Wed, 6 Nov 2002 20:51:42 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA26226 for ; Wed, 6 Nov 2002 20:51:41 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from opus.davidb.org (24-165-4-233.san.rr.com [24.165.4.233]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gA6Jpe516207 for ; Wed, 6 Nov 2002 20:51:40 +0100 (MET) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 189WDC-0002mO-00 for ; Wed, 06 Nov 2002 11:51:38 -0800 Date: Wed, 6 Nov 2002 11:51:38 -0800 From: David Brown To: caml-list@inria.fr Subject: Re: [Caml-list] calling telnet from a caml program Message-ID: <20021106195138.GA10650@opus.davidb.org> References: <20021106163446.GI3396@alan-schm1p> <20021106173914.GA2260@clipper.ens.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <20021106173914.GA2260@clipper.ens.fr> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 06, 2002 at 06:39:14PM +0100, Nicolas George wrote: > Le sextidi 16 brumaire, an CCXI, Andrei Errapart a ?crit?: > > If it is possible in C, then it is possible in OCaml, too. Most=20 > > probably some termios(3) calls are needed, but not much more. > There is nothing impossible, but there are horripilating portability > problems here. The CDK contains an mlexpect program, which, if it works, should do that. However, what is it you are trying to do with the "telnet" protocol. For the most part, telnet is just a simple connection to a port. Unix.open_connection will probably do exactly what you want, just make sure you get flushing working. If you need to deal with the tty management functionality of telnet (say for something interactive) that will take a bit more work. Dave Brown --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj3JcsoACgkQvnWKm2y0JNMQsACgnpukowE9qbKdTtfYhrTxvmBf XTgAn2fmb0k0XkRE09+EY4Q4piMjtwRd =1VW9 -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners