I'm trying to modify an application I have that has a
curses interface such that I can telnet to a port that
it is listening and accepting on, and have it display
it's interactive interface on that socket.
I've been able to get the application to listen to a
socket and accept the connections. I've found that
I can't simply dup2 the socket to stdin/stdout/stderr
since certain terminal control codes are not sent.
I found that the solution is to open a pty on the application
side, but I'm unsure how you chain the stdin/stdout/stderror
to the pty and then the socket.
I found some sample code on how to open a pty, which appears
to work, but it had nothing as far as attaching it to a
socket.
Are there any good examples out there? Online or books?
Thanks,
Brad