in reply to Re^2: Terminal across network
in thread Terminal across network
If I understood correctly now, then you don't need to start a different program to achieve this, you can just get your perl script to 'listen' on STDIN, and to the telnet socket. When the user types something in the window that the perl script is running in, the script sends it to the remote machine via the telnet socket. The answer comes back via the telnet socket, and is printed to STDOUT in the normal way. Does that make sense? And is it enough?
Coincidentally, I have written several programs of this type. im2 is one of them (but it's code is complex).
What you need are: IO::Socket::INET for the telnet connection (or maybe Net::Telnet) and IO::Select to check whether STDIN or the socket have data waiting, and deal with it appropriately.
Is that enough to start with?
C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Terminal across network
by rockmountain (Sexton) on Oct 21, 2004 at 09:12 UTC | |
by castaway (Parson) on Oct 21, 2004 at 09:56 UTC | |
by rockmountain (Sexton) on Oct 22, 2004 at 06:36 UTC |