I have class which communicates with router through telnet protocol. I can send text strings:
s = new Socket("201.20.2.3",23);
inputStream = s.getInputStream();
outputStream = s.getOutputStream();
outputStream.write( ("admin\n") .getBytes());
Thread.sleep(100);
outputStream.write("24\n".getBytes());
So \n acts like an Enter button.
But how to send an Escape button there?
Send the ASCII code for escape:
0x1b.