0
public Task Disconnect()
{
var context = new HaiTaxiContainer();
var driver = context.OperatorEmployeeSet.Where(o => o.ConnectionId == Context.ConnectionId).FirstOrDefault();
driver.IsWorking = false;
driver.OperatorWorkingHistory.Add(new OperatorWorkingHistory
{
IsWorking = false,
Time = DateTime.Now
});
return Clients.leave(Context.ConnectionId, DateTime.Now.ToString()); ;
}
if (chat.disconnect!=null){
chat.disconnect(function() {
alert('Server has disconnected');
});
alert('Server disconnect==smt');
}else{
alert('Server disconnect==null');
}
客戶端chat.disconect爲空。任何ideeas爲什麼?無法識別客戶端的SignalR斷開功能
你使用的是哪個版本? – 2012-07-18 16:57:06