code: def naws(self, data):
          
          if len(data) == 4:
              # NOTE: the first parameter of struct.unpack should be
              # a 'str' object. Both on Py2/py3. This crashes on OSX
              # otherwise.
              columns, rows = struct.unpack(str('!HH'), data)
              self.size_received_callback(rows, columns)
          else:
              logger.warning('Wrong number of NAWS bytes')
docs: Received NAWS. (Window dimensions.)