quixadhal has asked for the wisdom of the Perl Monks concerning the following question:
I am attempting to write a small telnet server, for the purpose of reviving an ancient text-based game as a client/server in perl, rather than the file-based C gremlin it was.
I'd like to allow folks to use their favorite telnet client, rather than forcing them to use a custom one.
So far, I'm using a simple non-blocking select loop (with IO::Socket::INET), and have found Net::Telnet::Options to help tame the protocol. With that, it's not hard to place the telnet client into single-character mode. I can also negotiate the terminal type and size, assuming the client isn't totally brain dead.
The point at which I'm unsure of my path is trying to get the Curses module to work with a socket as the "display", rather than trying to find my local pty. I'll also need to have multiple instances of Curses, one for each connected client.
How might I convince the mighty Curses module to believe me when I tell it the terminal characteristics, and to use a lowly socket as if it were a true pty?
Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Curses and Sockets
by Withigo (Friar) on Oct 09, 2007 at 04:10 UTC | |
by Withigo (Friar) on Oct 09, 2007 at 07:29 UTC | |
by quixadhal (Novice) on Oct 09, 2007 at 18:23 UTC |