MCPcopy Create free account
hub / github.com/aria2/aria2 / HttpServerBodyCommand

Method HttpServerBodyCommand

src/HttpServerBodyCommand.cc:70–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68namespace aria2 {
69
70HttpServerBodyCommand::HttpServerBodyCommand(
71 cuid_t cuid, const std::shared_ptr<HttpServer>& httpServer,
72 DownloadEngine* e, const std::shared_ptr<SocketCore>& socket)
73 : Command(cuid),
74 e_(e),
75 socket_(socket),
76 httpServer_(httpServer),
77 writeCheck_(false)
78{
79 // To handle Content-Length == 0 case
80 setStatus(Command::STATUS_ONESHOT_REALTIME);
81 e_->addSocketForReadCheck(socket_, this);
82 if (!httpServer_->getSocketRecvBuffer()->bufferEmpty() ||
83 socket_->getRecvBufferedLength()) {
84 e_->setNoWait(true);
85 }
86}
87
88HttpServerBodyCommand::~HttpServerBodyCommand()
89{

Callers

nothing calls this directly

Calls 4

addSocketForReadCheckMethod · 0.80
bufferEmptyMethod · 0.80
setNoWaitMethod · 0.80
getRecvBufferedLengthMethod · 0.45

Tested by

no test coverage detected