Experience sharing of 7-layer soft load under Windows (4)

  
        3, CookIEs we supposed to?

a) HttpWebRequest does not support the direct write cookie, cookie can only create a container, such as a response to come back before there will be cookies, more depressed, as a temporary write, receive the RealServer after the response the copy of the response to Listenresponse CookIEs and returned to the client

httpRequest.CookieContainer = newCookIEContainer ();

HttpWebResponsehttpResponse = (HttpWebResponse) httpRequest.GetResponse ();
< BR> listenresponse.Cookies = httpResponse.CookIEs;

4, the timeout value, decide not

a) httpRequest.Timeout = 20;

b) httpRequest.ReadWriteTimeout = 10;

do for the next layer of soft load Windows 7 to do some analysis, the feeling is that most do not fly HttpWebRequest, implement this stuff too complicated, too deep package, and is not designed to send a large number of outbound HTTP For connection, HttpListener should be okay, which is designed to be used as an HTTP server. It is not possible to use Remoting to pass H between Proxy and RealServer. TTP information, then convert Remoting to HTTP information on both sides.
Copyright © Windows knowledge All Rights Reserved