I' have this code, know that require anonymus closure function, but don't understand how it works. If I run it there is a `TypeError: undefined is not a function`.
Can some one explain me anonymus closure functions with the help of this code?

```
mysql= require('mysql');
var connection = mysql.createConnection({});

function check_auth(input, callback){
 var sql = "query to mysql";
connection.query(sql, function(err, results) {
    if (err) callback(err);
    if (results.length  > 0) {
        callback(null,results.values); //this is the line with error
    }else{
        callback(null, false);
    } 
  });
  };
  var io = require('socket.io').listen(5678);
  io.configure(function () {
  io.set('authorization', function(req, callback) {
    check_auth(req.query.s, function(err, result) {
        if (err) {
            return console.log('error:(');

        }
        if(result === false) {
            return callback('notauth', false);
        } else {
            return callback(null, result);;
        }
      });
    });
});

```