Skip to main content

Negotiate About Window Size (NAWS)

Option code: 31

See also: RFC 1073

When enabled, this Telnet option requests that the client immediately sends a telnet subnegotiation containing the current screen size (in characters) and later on every time the size changes. Usually it is the server that sends a IAC DO NAWS to toggle that behavior.

TokensBytesMeaning
IAC WILL NAWS255 251 31Client: I will/would like to send NAWS messages
IAC WONT NAWS255 252 31Client: I won't send NAWS messages
IAC DO NAWS255 253 31Server: Hey client, please send NAWS messages
IAC DONT NAWS255 254 31Server: Hey client, please stop doing NAWS

Handshake plus initial message

Height and Width are 16 bit values, requiring 2 octets each. Any occurrence of a value of 255 must be doubled