platypush/plugins/music/snapcast/__init__.py
def delete_client(self, client, host=None, port=None):
        """
        Delete a client from the Snapcast server

        :param client: Client name or ID
        :type client: str

        :param host: Snapcast server (default: default configured host)
        :type host: str

        :param port: Snapcast server port (default: default configured port)
        :type port: int
        """

        sock = None

        try:
            sock = self._connect(host or self.host, port or self.port)
            request = {
                'id': self._get_req_id(),
                'jsonrpc': '2.0',
                'method': 'Server.DeleteClient',
                'params': {}
            }

            client = self._get_client(sock, client)
            request['params']['id'] = client['id']
            # noinspection PyTypeChecker
            self._send(sock, request)
            return self._recv(sock)
        finally:
            try:
                sock.close()
            except Exception as e:
                self.logger.warning('Error on socket close', e)

        Delete a client from the Snapcast server

        :param client: Client name or ID
        :type client: str

        :param host: Snapcast server (default: default configured host)
        :type host: str

        :param port: Snapcast server port (default: default configured port)
        :type port: int
        
Delete a client from the Snapcast server
Delete a client from the Snapcast server
def delete_client(self, client, host=None, port=None):
        sock = None
        try:
            sock = self._connect(host or self.host, port or self.port)
            request = {
                'id': self._get_req_id(),
                'jsonrpc': '2.0',
                'method': 'Server.DeleteClient',
                'params': {}
            }
            client = self._get_client(sock, client)
            request['params']['id'] = client['id']
            self._send(sock, request)
            return self._recv(sock)
        finally:
            try:
                sock.close()
            except Exception as e:
                self.logger.warning('Error on socket close', e)
def delete_client ( self , client , host = None , port = None ) : sock = None try : sock = self . _connect ( host or self . host , port or self . port ) request = { 'id' : self . _get_req_id ( ) , 'jsonrpc' : '2.0' , 'method' : 'Server.DeleteClient' , 'params' : { } } client = self . _get_client ( sock , client ) request [ 'params' ] [ 'id' ] = client [ 'id' ] self . _send ( sock , request ) return self . _recv ( sock ) finally : try : sock . close ( ) except Exception as e : self . logger . warning ( 'Error on socket close' , e )
Delete a client from the Snapcast server
Delete a client from the Snapcast server
"""
        Delete a client from the Snapcast server

        :param client: Client name or ID
        :type client: str

        :param host: Snapcast server (default: default configured host)
        :type host: str

        :param port: Snapcast server port (default: default configured port)
        :type port: int
        """ # noinspection PyTypeChecker
self
client
Client name or ID
Client name or ID
host
Snapcast server (default: default configured host)
Snapcast server ( default : default configured host )
port
Snapcast server port (default: default configured port)
Snapcast server port ( default : default configured port )