internal void ClearTerminal()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes("\e
internal void ClearTerminal()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes("\e[J2"));
}
catch
{
Disconnect();
}
}
[/code]
[b]Compiles[/b]: Sends content to terminal but the terminal prints the string to the user instead of processing it.
[code]internal void ClearTerminal()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes(@"\e[J2"));
}
catch
{
Disconnect();
}
}
[/code]
Any other suggestions?
internal Socket client;
internal void FlushConsole()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes("\033internal Socket client;
internal void FlushConsole()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes("\033[J2"));
}
catch
{
Disconnect();
}
}[/code]
internal Socket client;
internal void FlushConsole()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes("\033internal Socket client;
internal void FlushConsole()
{
try
{
System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
client.Send(encoding.GetBytes("\033[J2"));
}
catch
{
Disconnect();
}
}[/code][/quote]
[code]
sam@shiny:~$ irb
irb(main):001:0> print "\033[2J"
[/code]
worked for me.
Clients currently connect to my C# telnet server via their own telnet client (I use puttytel) and play the game via their terminal. Anyone know of a way that I can clear the clients terminal screen of all text? Is there a specific way of doing this over telnet or am I going to have to fake it in some way? I know each telnet terminal has a different way of handling commands and such from the server, so I am curious if there is a standard that they all use for it or not. I read a telnet standardization document but really couldn't make heads or tells of what it meant lol.
Anyone know how I can do this without spamming the terminal full of blank lines?
Thanks