I have an ASP.NET (2.0) web page for our company Intranet which uses Ajax via Javascript to communicate with an application server via UDP. The web page needs to constantly listen for UDP data to be received and occasionally send UDP data when the user clicks a button.
I'm having an issue with the send request which seems to be blocked by the receive request. I'm using separate IFrames for the send and receive requests. Each IFrame page creates it's own XMLHttpRequest object and requests are both async.
The XMLHttpRequest.readyState value for the send receives a readyState of 1 (server connection established) but it never gets any further. If I stop the receive request from being submitted then the send request works fine. It seems to indicate that the receive request is blocking the send request.
The IFrames work as follows:
1) IFrame 1 : (Receive) Makes an async Ajax request to an .ASPX page and the server-side code waits up to 20 seconds (in the Page_Load event) for UDP data to be received and returns any received data or indicates 'No data'. In the client's onreadystatechange event then the method submits the Ajax request again. This procedure happens constantly during the lifetime of the parent page.
2) IFrame 2 : (Send) Makes an async Ajax request to an .ASPX page that sends some UDP data. This procedure happens occasionally when an operator clicks a button.
Can someone tell me if there's a way to overcome this issue? I know that my receive IFrame could constantly poll for received data but I don't really want to do that.