summaryrefslogtreecommitdiff
path: root/src/HttpSkipResponseCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-16 16:55:41 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-16 16:55:41 +0900
commitea1b4b3ee533146763245ecbbb4a31e3ed791498 (patch)
tree5dfda14ff291403bcee9b24380c1e47673b8a98b /src/HttpSkipResponseCommand.h
parent602a9d6ba3f8ee38c25448796ad51992f971da8c (diff)
Eliminated SocketCore::peekData() form HTTP/FTP downloads.
We introduced SocketRecvBuffer which buffers received bytes. Since HTTP response header and response body are divided with \r\n, we have to buffer up several bytes to find this delimiter. We use SocketRecvBuffer to hold these bytes and only consumes header and passes SocketRecvBuffer, which may contain head of response body, to next Command. Since FTPConnection doesn't use SocketCore::peekData(), we left it as is.
Diffstat (limited to 'src/HttpSkipResponseCommand.h')
-rw-r--r--src/HttpSkipResponseCommand.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/HttpSkipResponseCommand.h b/src/HttpSkipResponseCommand.h
index df44c364..4a04b43c 100644
--- a/src/HttpSkipResponseCommand.h
+++ b/src/HttpSkipResponseCommand.h
@@ -63,14 +63,15 @@ private:
protected:
virtual bool executeInternal();
public:
- HttpSkipResponseCommand(cuid_t cuid,
- const SharedHandle<Request>& req,
- const SharedHandle<FileEntry>& fileEntry,
- RequestGroup* requestGroup,
- const SharedHandle<HttpConnection>& httpConnection,
- const SharedHandle<HttpResponse>& httpResponse,
- DownloadEngine* e,
- const SharedHandle<SocketCore>& s);
+ HttpSkipResponseCommand
+ (cuid_t cuid,
+ const SharedHandle<Request>& req,
+ const SharedHandle<FileEntry>& fileEntry,
+ RequestGroup* requestGroup,
+ const SharedHandle<HttpConnection>& httpConnection,
+ const SharedHandle<HttpResponse>& httpResponse,
+ DownloadEngine* e,
+ const SharedHandle<SocketCore>& s);
virtual ~HttpSkipResponseCommand();