Socket.io emit callback not firing on server side?

My server emits events properly, but the emit callback never works. In the following, nothing is logged on my console:

Server:

io.sockets.emit('delete hint', {id: id}, function(data){
                    console.log('callback');
                });

Client:

socket.on('delete hint', function(data){
    // display a message before deleting
    $('#' + data.id).fadeOut(function(){ 
        $(this).remove();
    });
});

I've also tried the client side code as function(data, fn) in case the callback needed to be included on the receiving function.

I'm using windows and my command prompt shows the following when socket.io is emitting the event:

websocket writing 5:::{"name":"delete hint", "args":[{"id":"1"}, null]}

I can't figure out what the problem is, what am I doing wrong?

You need to call the callback.

socket.on('delete hint', function(data, cb){
    // display a message before deleting
    $('#' + data.id).fadeOut(function(){ 
        $(this).remove();
        cb(null, 'done');
    });
});

A callback is executed on the sender computer when the receiver computer calls it

Have a look at this code:

Server:

io.sockets.on('connection', connectionFunc);

function connectionFunc (socket) {
    socket.emit('delete hint', "data for client", callThis);
}

//this function is executed when client calls it
function callThis (dataFromClient){

    console.log("Call back fired: " + dataFromClient);
}

Client:

    socket.on('delete hint', function(data, callback) {

        console.log("i received: "+ data);
        // call back will fire only when u the next line runs
        callback("the callThis function on server will run");            

    });

You can do this the opposite way.