苏飞论坛
标题:
HttpHelper异步请求容易发生阻塞
[打印本页]
作者:
一夜七次
时间:
2019-12-7 11:48
标题:
HttpHelper异步请求容易发生阻塞
发现一个问题:异步请求时常常发生阻塞
POST请求似乎更容易发生阻塞的问题.
不知道是什么原因?
public static void GetDepth(string symbol)
{
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = $"https://api.********.com/market/depth?symbol={symbol}&type=step0&depth=20",
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36",
ResultType = ResultType.String,
Timeout = 1000,
ReadWriteTimeout = 1000
};
http.BeginInvokeGetHtml(item, new ResultHandler(Market.Depth_arrived));
欢迎光临 苏飞论坛 (http://www.sufeinet.com/)
Powered by Discuz! X3.4