There was an error while loading. Please reload this page.
1 parent cc2ea15 commit 4a55f1aCopy full SHA for 4a55f1a
prompt_toolkit/contrib/telnet/server.py
@@ -62,9 +62,12 @@ def _initialize_telnet(connection: socket.socket) -> None:
62
connection.send(IAC + DO + NAWS)
63
64
# Negotiate terminal type
65
+ # Assume the client will accept the negociation with `IAC + WILL + TTYPE`
66
connection.send(IAC + DO + TTYPE)
67
- # Negotiate terminal type
68
+ # We can then select the first terminal type supported by the client,
69
+ # which is generally the best type the client supports
70
+ # The client should reply with a `IAC + SB + TTYPE + IS + ttype + IAC + SE`
71
connection.send(IAC + SB + TTYPE + SEND + IAC + SE)
72
73
0 commit comments