请教关于TIDHTTPSERVER的问题 |
缺席
|
mysql
一般會員 發表:7 回覆:15 積分:4 註冊:2003-12-10 發送簡訊給我 |
我想使用TIDHTTPSERVER制作一个简单的WEB SERVER。我想在HTTP中传输一些比较大的文件,现在存在的问题是:(delphi 6.0,indy 9.0)
1、当客户端断开的时候,由于文件没有传送完毕,程序报错:SOCKT 10054。这个问题如何解决?如何知道客户断开,而我也停止文件的传送?
2、当传输一些大文件的时候(100M),它的一些SESSION时间如何定义?传送文件的过程应该是ACTIVE,SESSION会自动KEEP LIVE吧?
(我使用的是indy网站下载的DEMO) 我实际的目的是想使用HTTP方式制作一个简单的串流服务器,不知道各位大哥有什么好的建议。(HELIX不好用,又找不到其他软件,使用IIS等服务器又不能控制一些多线程连接等问题,所以自己做)。 發表人 - mysql 於 2004/03/21 18:30:57
|
mysql
一般會員 發表:7 回覆:15 積分:4 註冊:2003-12-10 發送簡訊給我 |
|
mysql
一般會員 發表:7 回覆:15 積分:4 註冊:2003-12-10 發送簡訊給我 |
好像在控件里面就根本省略了几个参数。
在IdCustomHttpServer.pas里面,省略了:
FContentRangeEnd: Cardinal;
FContentRangeStart: Cardinal;
所以,我猜测,使用INDY控件制作的HTTPSERVER应该不支持断点续传。
我的判断正确吗?
如果正确,如何修改?
TIdHTTPRequestInfo = class(TIdRequestHeaderInfo)
protected
FAuthExists: Boolean;
FCookies: TIdServerCookies;
FParams: TStrings;
FPostStream: TStream;
FRawHTTPCommand: string;
FRemoteIP: string;
FSession: TIdHTTPSession;
FDocument: string;
FCommand: string;
FVersion: string;
FAuthUsername: string;
FAuthPassword: string;
FUnparsedParams: string;
FQueryParams: string;
FFormParams: string;
//
procedure DecodeAndSetParams(const AValue: String);
public
constructor Create; override;
destructor Destroy; override;
property Session: TIdHTTPSession read FSession;
//
property AuthExists: Boolean read FAuthExists;
property AuthPassword: string read FAuthPassword;
property AuthUsername: string read FAuthUsername;
property Command: string read FCommand;
property Cookies: TIdServerCookies read FCookies;
property Document: string read FDocument write FDocument; // writable for isapi compatibility. Use with care
property Params: TStrings read FParams;
property PostStream: TStream read FPostStream write FPostStream;
property RawHTTPCommand: string read FRawHTTPCommand;
property RemoteIP: String read FRemoteIP;
property UnparsedParams: string read FUnparsedParams write FUnparsedParams; // writable for isapi compatibility. Use with care
property FormParams: string read FFormParams write FFormParams; // writable for isapi compatibility. Use with care
property QueryParams: string read FQueryParams write FQueryParams; // writable for isapi compatibility. Use with care
property Version: string read FVersion;
end;
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |