Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I configure a C# web service client to send HTTP request header and body in parallel?
    primarykey
    data
    text
    <p>I am using a traditional C# web service client generated in VS2008 .Net 3.5, inheriting from SoapHttpClientProtocol. This is connecting to a remote web service written in Java.</p> <p>All configuration is done in code during client initialization, and can be seen below:</p> <pre><code> ServicePointManager.Expect100Continue = false; ServicePointManager.DefaultConnectionLimit = 10; var client = new APIService { EnableDecompression = true, Url = _url + "?guid=" + Guid.NewGuid(), Credentials = new NetworkCredential(user, password, null), PreAuthenticate = true, Timeout = 5000 // 5 sec }; </code></pre> <p>It all works fine, but the time taken to execute the simplest method call is almost double the network ping time. Whereas a Java test client takes roughly the same as the network ping time:</p> <pre><code>C# client ~ 550ms Java client ~ 340ms Network ping ~ 300ms </code></pre> <p>After analyzing the TCP traffic for a session discovered the following:</p> <p>Basically, the C# client sent TCP packets in the following sequence.</p> <pre><code>Client Send HTTP Headers in one packet. Client Waits For TCP ACK from server. Client Sends HTTP Body in one packet. Client Waits For TCP ACK from server. </code></pre> <p>The Java client sent TCP packets in the following sequence.</p> <pre><code>Client Sends HTTP Headers in one packet. Client Sends HTTP Body in one packet. Client Revieves ACK for first packet. Client Revieves ACK for second packet. Client Revieves ACK for second packet. </code></pre> <p>Is there anyway to configure the C# web service client to send the header/body in parallel as the Java client appears to?</p> <p>Any help or pointers much appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload