1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-23 21:27:14 +01:00
SqMod/vendor/POCO/Net/include/Poco/Net/HTTPBufferAllocator.h
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

51 lines
824 B
C++

//
// HTTPBufferAllocator.h
//
// 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