bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ncurses on pipes


From: Bernd Jendrissek
Subject: Re: ncurses on pipes
Date: Wed, 13 Jun 2007 15:22:42 +0200
User-agent: Mutt/1.4.2.1i

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jun 13, 2007 at 02:47:53PM +0200, Robert Lemmen wrote:
> i have searched the web and the archive and it looks like this problems
> pops up every now and then, but without any real answer. i want to write
> a network server that allows clients to connect via telnet and be
> confronted with a curses user interface. sounds simple. but in order to
> do so, i need to create a curses screen that is not connected to a tty
> but to a socket or even better a pipe (since i want to do the telnet
> protocol handling between the socket and the pipe). the following ugly
> snippet illustrates the problem:

How about using pseudo TTYs like telnetd itself does?  Look for
openpty(), forkpty().  I don't have man pages for them but they are
documented in the GNU C library info pages.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGb++dwyMv24BBd/gRAjSeAJ9szloMDouyr8nKwLoRvp+7djlcQgCglZwt
d3HZjSU+FIPI1IzQVjHzvSg=
=UJoC
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]