首页 > Web开发 > 详细

HTTP 超时

时间:2016-10-16 11:26:57      阅读:271      评论:0      收藏:0      [点我收藏+]
  TWinHTTPTimeouts = class(TPersistent)
  private
    FConnectTimeout, FReceiveTimeout, FSendTimeout: DWord;
  public
    procedure Assign(Source: TPersistent); override;  
  published
    property ConnectTimeout: DWord read FConnectTimeout write FConnectTimeout default 0;
    property ReceiveTimeout: DWord read FReceiveTimeout write FReceiveTimeout default 0;
    property SendTimeout: DWord read FSendTimeout write FSendTimeout default 0;
  end;

 

 

 

 

 

 

Applies to 

  WinHTTP component.  
   


Declaration 

  property WaitTimeout: Integer;  
   


Description 

  The WaitTimeout property specifies the time interval (limit), in milliseconds unit, which application able to wait until the HTTP request will be completed.  
   
  For example, if the maximum time which you can allow to complete HTTP request is 5 seconds, set this value to 5000 (milliseconds). If application can wait infinitely, set WaitTimeout to 0.  
   
  技术分享 When the timeout is expired, the component automatically terminates the HTTP request. To be notified when the WaitTimeout is expired — write OnWaitTimeoutExpired event handler.  
   


Notes 

  The WaitTimeout only works together with WaitThread property, only when it set to True.  
   


See also 

  WaitThreadThreadThreadPriority and Suspended properties;  
  Read and Abort methods;  

  OnWaitTimeoutExpired event.  

HTTP 超时

原文:http://www.cnblogs.com/CodeGear/p/5966073.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!