mirror of
https://github.com/sogou/workflow.git
synced 2026-10-20 06:11:21 +08:00
remove HttpMessage::get_output_body_noocpy
This commit is contained in:
@@ -67,30 +67,6 @@ bool HttpMessage::append_output_body_nocopy(const void *buf, size_t size)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool HttpMessage::get_output_body_nocopy(struct iovec iov[], int *iovcnt) const
|
||||
{
|
||||
struct HttpMessageBlock *block;
|
||||
struct list_head *pos;
|
||||
int i = 0;
|
||||
|
||||
list_for_each(pos, &this->output_body)
|
||||
{
|
||||
if (i >= *iovcnt)
|
||||
{
|
||||
errno = ENOBUFS;
|
||||
return false;
|
||||
}
|
||||
|
||||
block = list_entry(pos, struct HttpMessageBlock, list);
|
||||
iov[i].iov_base = (void *)block->ptr;
|
||||
iov[i].iov_len = block->size;
|
||||
i++;
|
||||
}
|
||||
|
||||
*iovcnt = i;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HttpMessage::clear_output_body()
|
||||
{
|
||||
struct HttpMessageBlock *block;
|
||||
|
||||
@@ -127,7 +127,6 @@ public:
|
||||
* msg->append_output_body_nocopy(body, size); */
|
||||
bool append_output_body(const void *buf, size_t size);
|
||||
bool append_output_body_nocopy(const void *buf, size_t size);
|
||||
bool get_output_body_nocopy(struct iovec iov[], int *iovcnt) const;
|
||||
void clear_output_body();
|
||||
|
||||
size_t get_output_body_size() const
|
||||
|
||||
Reference in New Issue
Block a user