code: def write(self, message):
          
          try:
              self.socket.send(message.encode('utf-8') + b'\0')
          except socket.error:
              if not self._closed:
                  raise BrokenPipeError
  
          return Future.succeed(None)
docs: Coroutine that writes the next packet.