От: | o.kostya | ||
Дата: | 25.06.08 11:55 | ||
Оценка: |
The Nagle algorithm reduces network traffic by causing the socket to buffer packets for up to 200 milliseconds and then combines and sends them in one packet
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create("http://");
webRequest.Method = "POST";
webRequest.ProtocolVersion = HttpVersion.Version10;
byte[] bytes = Encoding.UTF8.GetBytes(body);
webRequest.ContentLength = bytes.Length;
using (Stream requestStream = webRequest.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();