若要複寫SignalR Hub的OnConnected、OnDisconnected、OnReconnected
JavaScript
var chat = $.connection.chatHub;
// Need at least one callback for events to be raised on the hub
chat.client.void = function () { };//這行非加不可 否則不會自動執行Server的OnConnected跟OnDisconnected
// Start the connection.
$.connection.hub.start();
沒有留言:
張貼留言