Files
poco/Net/include/Poco/Net/HTTPBufferAllocator.h
Roger Meier b0581433a7 LICENSE: add info about SPDX-License-Identifier usage and use it
fix: remove executable flag and change back to 100644 (was 100755)

Signed-off-by: Roger Meier <r.meier@siemens.com>
2014-05-14 08:38:09 +02:00

53 lines
868 B
C++

//
// HTTPBufferAllocator.h
//
// $Id: //poco/Main/template/class.h#4 $
//
// Library: Net
// Package: HTTP
// Module: HTTPBufferAllocator
//
// Definition of the HTTPBufferAllocator class.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Net_HTTPBufferAllocator_INCLUDED
#define Net_HTTPBufferAllocator_INCLUDED
#include "Poco/Net/Net.h"
#include "Poco/MemoryPool.h"
#include <ios>
namespace Poco {
namespace Net {
class Net_API HTTPBufferAllocator
/// A BufferAllocator for HTTP streams.
{
public:
static char* allocate(std::streamsize size);
static void deallocate(char* ptr, std::streamsize size);
enum
{
BUFFER_SIZE = 4096
};
private:
static Poco::MemoryPool _pool;
};
} } // namespace Poco::Net
#endif // Net_HTTPBufferAllocator_INCLUDED