O
OJ
Hi,
I have written a small C# 2.0 DLL which acts as a client to a Socket
based server over the internet. I have written both synchronous and
asynchronous methods to connect, send, and receive data from the
server. Each request/response can take upto 180 seconds. I am trying to
use the asyncronous calls in an ASP.NET C# 2.0 Webcontrol, which
displays the returned data. At the moment I am happily using the
asyncronous functions and events in my ASP.NET Usercontrol, but I am
having to block the main ASP.NET thread until the worker threads
dealing with the server response notifies my control that it has
returned all data. Then I render the control with all the returned
data. Obviously this destroys the advantage of the async functions.
There is an event firing in the dll that notifies me when new data has
arrived whilst waiting for all data to return. What I would really like
is to render the page to the client and then asynchronously update the
control from the server with the data that has arrived, before all data
has arrived. Could anybody point me in the right direction to implement
this?
OJ
I have written a small C# 2.0 DLL which acts as a client to a Socket
based server over the internet. I have written both synchronous and
asynchronous methods to connect, send, and receive data from the
server. Each request/response can take upto 180 seconds. I am trying to
use the asyncronous calls in an ASP.NET C# 2.0 Webcontrol, which
displays the returned data. At the moment I am happily using the
asyncronous functions and events in my ASP.NET Usercontrol, but I am
having to block the main ASP.NET thread until the worker threads
dealing with the server response notifies my control that it has
returned all data. Then I render the control with all the returned
data. Obviously this destroys the advantage of the async functions.
There is an event firing in the dll that notifies me when new data has
arrived whilst waiting for all data to return. What I would really like
is to render the page to the client and then asynchronously update the
control from the server with the data that has arrived, before all data
has arrived. Could anybody point me in the right direction to implement
this?
OJ