gpt4 book ai didi

c# - Windows Phone 7 是否支持 KeepAlive 连接?

转载 作者:太空宇宙 更新时间:2023-11-03 11:16:23 26 4
gpt4 key购买 nike

我尝试使用 Hammock 库在手机上使用开放式(流式)连接。问题是 Windows Phone 似乎不接受 KeepAlive 连接(WebRequest.KeepAlive 不可用),我想知道是否有任何方法可以使用它们。

谢谢!

最佳答案

这是可能的:

        HttpWebRequest request = HttpWebRequest.CreateHttp(new Uri(@"http://www.mysite.com", UriKind.Absolute)) as HttpWebRequest;
request.Headers["Connection"] = "Keep-Alive";

关于c# - Windows Phone 7 是否支持 KeepAlive 连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12538826/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com