def broadcast(self):
        """
        Send a multicast M-SEARCH request asking for devices to report in.
        """
        log.debug("Broadcasting M-SEARCH to %s:%s", self.mcast_ip, self.mcast_port)
        request = '\r\n'.join(("M-SEARCH * HTTP/1.1",
                               "HOST:{mcast_ip}:{mcast_port}",
                               "ST:upnp:rootdevice",
                               "MX:2",
                               'MAN:"ssdp:discover"',
                               "", "")).format(**self.__dict__)
        self.server.sendto(request.encode(), (self.mcast_ip, self.mcast_port))
def broadcast ( self ) : log . debug ( "Broadcasting M-SEARCH to %s:%s" , self . mcast_ip , self . mcast_port ) request = '\r\n' . join ( ( "M-SEARCH * HTTP/1.1" , "HOST:{mcast_ip}:{mcast_port}" , "ST:upnp:rootdevice" , "MX:2" , 'MAN:"ssdp:discover"' , "" , "" ) ) . format ( ** self . __dict__ ) self . server . sendto ( request . encode ( ) , ( self . mcast_ip , self . mcast_port ) )
Send a multicast M-SEARCH request asking for devices to report in.