Perhaps this is a naive solution but what about doing:
function bind(context, fn) () {
return function() { fn.apply(context, arguments); };
}
socket.on("message", bind(object, function(message) { // do stuff });
I think dojo provides a function (bind?) to do this that is much more intelligent.
-Tad