I am developing real time client-server application using SignalR, ASP.NET and C#. I am using localhost as host and VS2103.
My questions are:
1. After I close server, on web-client the "Reconnect" event occurs and the "Disconnect" event occurs only after. Why?
2. The "Disconnect " occurs 30+ seconds after of unknown "Reconnect" . How to reduce this time?
3....
User Profile
Collapse
-
Solved
Solved.
HTTP is stateless, ASP.NET WebForms only tries to hide this with viewstate and such. As soon as you see the page in your browser, the page isn't alive anymore and your OnSend callback won't be called anymore. This is also explained in Create web page with live socket based data.
If your goal is to update an HTML element with server-fed data, take a look at SignalR.
http://stackoverf... -
How to listen socket in single ASP page?
I am developing client-server application using TCP Socekts and C#. I need to send message from console application to ASP page. I can connect from ASP page using OnLoad event and sometimes on PageLoad event I can receive several messages only. I have 2 questions:
1. How to listen continuously the server socket and receive messages?
2. How to know when the ASP page closed (by user) to disconnect from server?
Console...
No activity results to display
Show More
Leave a comment: