StreamReadReplyTask.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "config.h"
00023
00024 #include "StreamReadReplyTask.hpp"
00025 #include <algorithm>
00026 #include <cassert>
00027
00028 using namespace mermaid::support::io;
00029
00030 StreamReadReplyTask::~StreamReadReplyTask()
00031 {
00032 delete[] data_;
00033 }
00034
00035 StreamReadReplyTask::StreamReadReplyTask (size_t bytesRead, size_t requestedBytes, const char* data, bool success,
00036 shared_ptr<StreamOperationHandlerMethodBase> streamOperationHandler) :
00037 Task(), bytesRead_ (bytesRead), requestedBytes_ (requestedBytes), data_ (data), success_ (success), streamOperationHandler_ (streamOperationHandler)
00038 {
00039 }
00040
00041 void StreamReadReplyTask::run()
00042 {
00043 streamOperationHandler_->callHandler (bytesRead_, requestedBytes_, data_, success_);
00044 }
00045