code: def write_shortstr(self, s):
          
          if isinstance(s, unicode):
              s = s.encode('utf-8')
          self.write_octet(len(s))
          self.write(s)
          return self
docs: Write a string up to 255 bytes long after encoding.  If passed
          a unicode string, encode as UTF-8.