def call(self, method, params, callback=None):
        """Call a method on the server

        Arguments:
        method - the remote server method
        params - an array of commands to send to the method

        Keyword Arguments:
        callback - a callback function containing the return data"""
        cur_id = self._next_id()
        if callback:
            self._callbacks[cur_id] = callback
        self.send({'msg': 'method', 'id': cur_id, 'method': method, 'params': params})
def call ( self , method , params , callback = None ) : cur_id = self . _next_id ( ) if callback : self . _callbacks [ cur_id ] = callback self . send ( { 'msg' : 'method' , 'id' : cur_id , 'method' : method , 'params' : params } )
Call a method on the server

        Arguments:
        method - the remote server method
        params - an array of commands to send to the method

        Keyword Arguments:
        callback - a callback function containing the return data