client/index.js
function addSimpleMethod(name, msg, failureIsError) {
    LockdClient.prototype[name] = function(objName, cb) {
        var self = this;

        self.transport.request(util.format(msg, objName), 1, function(err, lines) {
            self._processResponseLine(cb, err, lines && lines[0], failureIsError);
        });
    };
}
function addSimpleMethod(name, msg, failureIsError) {
    LockdClient.prototype[name] = function(objName, cb) {
        var self = this;

        self.transport.request(util.format(msg, objName), 1, function(err, lines) {
            self._processResponseLine(cb, err, lines && lines[0], failureIsError);
        });
    };
}
function addSimpleMethod ( name , msg , failureIsError ) { LockdClient . prototype [ name ] = function ( objName , cb ) { var self = this ; self . transport . request ( util . format ( msg , objName ) , 1 , function ( err , lines ) { self . _processResponseLine ( cb , err , lines && lines [ 0 ] , failureIsError ) ; } ) ; } ; }
Add a simple method to the client prototype which sends a message to the lockd server and expects a single line back in response.
Add a simple method to the client prototype which sends a message to the lockd server and expects a single line back in response .