code: def recv_until(self, s, max_size=None, timeout='default'):
          
  
          self._print_recv_header(
              '======== Receiving until {0}{timeout_text} ========', timeout, repr(s))
  
          if max_size is None:
              max_size = 2 ** 62
  
          def _predicate(buf):
              try:
                  return min(buf.index(s) + len(s), max_size)
              except ValueError:
                  return 0 if len(buf) < max_size else max_size
          return self._recv_predicate(_predicate, timeout)
docs: Recieve data from the socket until the given substring is observed.
          Data in the same datagram as the substring, following the substring,
          will not be returned and will be cached for future receives.
  
          Aliases: read_until, readuntil, recvuntil