Click here to Skip to main content
15,891,926 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
XML
I need to display a stream of message. The client method DisplayMessage is not executing everytime. But when I put debugger in the client code, it executes everytime. Here is my client code.

        chat.client.displayMessage = function (data) {
        // Html encode display data
        debugger;

        var encodedData = $('<div />').text(data.GPSPosition).html();
        $('#discussion').append('<li>' + encodedData + '</li>');

}

how can i display a stream of messages? Why it is only working with debugger?

Here is my server code. I am calling client method from a class outside the hub class.

        IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext<AzureGuidanceEventHubReceiver>();
       hubContext.Clients.All.DisplayMessage(newData);
Posted
Comments
Remove debugger and see the console. Is there any errors listed?
roshnithomas14 27-Apr-15 6:31am    
No errors listed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900