Synapse timeout (Thanks MVC).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4631 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
327dd4aab6
commit
357860b2cf
@ -54,6 +54,8 @@ Type
|
|||||||
FFormat : string;
|
FFormat : string;
|
||||||
FCookieManager : ICookieManager;
|
FCookieManager : ICookieManager;
|
||||||
private
|
private
|
||||||
|
function GetConnectTimeout : Integer;
|
||||||
|
function GetReadTimeout : Integer;
|
||||||
function IndexOfHeader(const AHeader : string) :Integer;
|
function IndexOfHeader(const AHeader : string) :Integer;
|
||||||
function GetAddress: string;
|
function GetAddress: string;
|
||||||
function GetContentType: string;
|
function GetContentType: string;
|
||||||
@ -63,11 +65,13 @@ Type
|
|||||||
function GetProxyUsername: string;
|
function GetProxyUsername: string;
|
||||||
function GetSoapAction : string;
|
function GetSoapAction : string;
|
||||||
procedure SetAddress(const AValue: string);
|
procedure SetAddress(const AValue: string);
|
||||||
|
procedure SetConnectTimeout(AValue : Integer);
|
||||||
procedure SetContentType(const AValue: string);
|
procedure SetContentType(const AValue: string);
|
||||||
procedure SetProxyPassword(const AValue: string);
|
procedure SetProxyPassword(const AValue: string);
|
||||||
procedure SetProxyPort(const AValue: Integer);
|
procedure SetProxyPort(const AValue: Integer);
|
||||||
procedure SetProxyServer(const AValue: string);
|
procedure SetProxyServer(const AValue: string);
|
||||||
procedure SetProxyUsername(const AValue: string);
|
procedure SetProxyUsername(const AValue: string);
|
||||||
|
procedure SetReadTimeout(AValue : Integer);
|
||||||
procedure SetSoapAction(const AValue : string);
|
procedure SetSoapAction(const AValue : string);
|
||||||
protected
|
protected
|
||||||
procedure DoSendAndReceive(ARequest,AResponse:TStream); override;
|
procedure DoSendAndReceive(ARequest,AResponse:TStream); override;
|
||||||
@ -85,6 +89,8 @@ Type
|
|||||||
property ProxyPassword : string read GetProxyPassword write SetProxyPassword;
|
property ProxyPassword : string read GetProxyPassword write SetProxyPassword;
|
||||||
property SoapAction : string read GetSoapAction write SetSoapAction;
|
property SoapAction : string read GetSoapAction write SetSoapAction;
|
||||||
property Format : string read FFormat write FFormat;
|
property Format : string read FFormat write FFormat;
|
||||||
|
property ConnectTimeout: Integer read GetConnectTimeout write SetConnectTimeout;
|
||||||
|
property ReadTimeout: Integer read GetReadTimeout write SetReadTimeout;
|
||||||
End;
|
End;
|
||||||
{$M+}
|
{$M+}
|
||||||
|
|
||||||
@ -99,6 +105,16 @@ const
|
|||||||
|
|
||||||
{ THTTPTransport }
|
{ THTTPTransport }
|
||||||
|
|
||||||
|
function THTTPTransport.GetConnectTimeout : Integer;
|
||||||
|
begin
|
||||||
|
Result := FConnection.Sock.ConnectionTimeout;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function THTTPTransport.GetReadTimeout : Integer;
|
||||||
|
begin
|
||||||
|
Result := FConnection.Timeout;
|
||||||
|
end;
|
||||||
|
|
||||||
function THTTPTransport.IndexOfHeader(const AHeader : string) : Integer;
|
function THTTPTransport.IndexOfHeader(const AHeader : string) : Integer;
|
||||||
var
|
var
|
||||||
i : Integer;
|
i : Integer;
|
||||||
@ -165,6 +181,11 @@ begin
|
|||||||
FAddress := AValue;
|
FAddress := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure THTTPTransport.SetConnectTimeout(AValue : Integer);
|
||||||
|
begin
|
||||||
|
FConnection.Sock.ConnectionTimeout := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure THTTPTransport.SetContentType(const AValue: string);
|
procedure THTTPTransport.SetContentType(const AValue: string);
|
||||||
begin
|
begin
|
||||||
FConnection.MimeType := AValue;
|
FConnection.MimeType := AValue;
|
||||||
@ -190,6 +211,11 @@ begin
|
|||||||
FConnection.ProxyUser := AValue;
|
FConnection.ProxyUser := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure THTTPTransport.SetReadTimeout(AValue : Integer);
|
||||||
|
begin
|
||||||
|
FConnection.Timeout := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure THTTPTransport.SetSoapAction(const AValue : string);
|
procedure THTTPTransport.SetSoapAction(const AValue : string);
|
||||||
var
|
var
|
||||||
i : Integer;
|
i : Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user