How to give notification message to the currently logged in users using c#

We are creating a new socket for the currently logged in user asynchronously.The server will notify this user at appropriate time then a pop up message should occur to the users who might be in different view page. we are creating socket like:

Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

socket.BeginReceive(buffer, 0, buffer.Length, 0,
                  new AsyncCallback(ReceiveNotification), socket);


private void ReceiveNotification(IAsyncResult ar)
{
    Socket socket = (Socket)ar.AsyncState;

    socket.EndReceive(ar);

    //Need to perform notification stuff here                 
    socket.Close();
}   

Answers


I'd suggest you to try https://github.com/SignalR, it allows notify all open clients and maintain transport level so you don't need to care about sockets etc.


Need Your Help

adding javascript settimeout function

javascript css events javascript-events

I am not a coder/programmer and I found a script I would like to use and I used my wysiwyg editor to try to make it work the best I could, but it still does not work the way I want maybe someone co...

How to Call the json webservice in the background?

iphone ios ipad

I have an application in which I have a settings page, where I need to edit each entity. For that when the user selects each entity we will go to a separate page and edit there and come back. I n...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.