code: def request_via_socket(sock, search_target):
      '''Send an SSDP search request via the provided socket.
  
      Args:
          sock: A socket suitable for use to send a broadcast message - preferably
              one created by :py:func:`make_socket`.
          search_target (string): A :term:`resource type` target to search for.
      '''
      msgparts = dict(HOST=MCAST_IP_PORT, MAN='"ssdp:discover"', MX='3', ST=search_target)
      msg = encode_request('M-SEARCH * HTTP/1.1', **msgparts)
      sock.sendto(msg, (MCAST_IP, MCAST_PORT)f request_via_socket(sock, search_target):
      '''Send an SSDP search request via the provided socket.
  
      Args:
          sock: A socket suitable for use to send a broadcast message - preferably
              one created by :py:func:`make_socket`.
          search_target (string): A :term:`resource type` target to search for.
      '''
      msgparts = dict(HOST=MCAST_IP_PORT, MAN='"ssdp:discover"', MX='3', ST=search_target)
      msg = encode_request('M-SEARCH * HTTP/1.1', **msgparts)
      sock.sendto(msg, (MCAST_IP, MCAST_PORT))
docs: Send an SSDP search request via the provided socket.
  
      Args:
          sock: A socket suitable for use to send a broadcast message - preferably
              one created by :py:func:`make_socket`.
          search_target (string): A :term:`resource type` target to search for.