AboutSyed Rizwan Muhammad Rizvi Expertise I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.
Experience Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.
Question I'm trying to port a project for work into multi-threading in hopes to make it faster, however the bottle-neck is in the xml post. Here is what my code currently states:
oXMLHTTP = New MSXML2.XMLHTTP
strURL = p2server 'contains the url that the xml is posted to
oXMLHTTP.send(strPost) 'strPost contains the xml string that I'm posting
The xml string is actually fromatted in a "field=value&field=value" format
My question is: is there a way to get my program to be able to post more than one xml string at a time? Each time this section of code is called, it's in a different string, so I don't doubt that many are getting to this section of code at the same time, but only one can run it at the same time.
Thank you very much,
Josh
Answer You cant send more than strings at a time, but you can devise some way to send all the data together, but then the reciever needs to be able to understand and parse it accordingly, which I assume is beyond your control.
There is a technique called Mutual Exclusion, you can use this technique to allow only one thread to access this method at a time and as soon as the thread realeases the method the other threads can use it.