"this" is representing your function in that scope.
try :
function Chat(some, nick, url) {
this.socket = null;
this.Nickname = nick;
this.Url = url;
var that = this;
this.Connect = function () {
socket = io.connect(this.Url);
socket.on('connect', function (data) {
var p = that.Nickname; //this.Nickname is undifined why?
// how can I acess to the Nickname variable or function?
}
};
}
Note the assignment of "this" into "that"