code: def streamWrite(self, size):
          
          size = int(size)
          if size == 0:
              self._close()
              return
  
          self._sendResult(dict(message="writing...", stream=True, size=size))
          data = sys.stdin.read(size)
          self.stream.write(data)
docs: Send or receive a chunk of data.
  
          :arg size:  Amount of data.  0 indicates EOT.