AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Syed 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.

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > multi-threaded xml posts in vb.net

Topic: VB.NET



Expert: Syed Rizwan Muhammad Rizvi
Date: 6/30/2006
Subject: multi-threaded xml posts in vb.net

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.open("POST", strURL, False)

oXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")

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.  

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.