telnet can only return text. So that is all that the server can do.
The client is free to do what it wants with that text. There are only two options for the client
- Blank lines.
- The client accepts special sequences of text which cause it to take action in regards to the display.
Telnet clients (not servers) often allow for an option to emulate one or more 'terminal' types. The standard windows telnet allows for the OPTION of choosing one of the following.
vt100, vt52, ansi and vtnt only
Terminal emulation is a bit iffy but clear screen is pretty common and the following link might be suitable for defining what a VT100/52 might do.
http://ascii-table.com/ansi-escape-sequences-vt-100.php[
^]
Now if and ONLY if the following is true then you could allow terminal emulation in your server.
1. The telnet client must support terminal emulation
2. Terminal emulation must be turned on.
3. Terminal emulation must be set to what the server supports.
4. The terminal emulation must actually do what it claims.
If all of that is true then you could set up your server to emulate one or more terminals. However you must have a mode that doesn't emulate any terminal and you must have a way (command) that explicitly turns it on). There might be a 'standard' in which telnet clients send some info to the server automatically identifying which terminal the client expects but I am not going to reasearch that.
I will warn you that the problem with the above is that you will get users that complain that it "doesn't work". And determinig why it doesn't work can be very difficult. So if you are going to guarantee to your users that it will work versus that it might work you are going to have increased support costs.