mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-02 10:43:22 +01:00
* add possibility to use native sendFile from OS for HttpServerResponse add option POCO_USE_SENDFILE_FOR_HTTPSERVER, default - OFF add test for HttpServer - testFile add define fro Config.h POCO_USE_SENDFILE_FOR_HTTPSERVER * my fail, be carefull with macro and brackets * replace option POCO_USE_SENDFILE_FOR_HTTPSERVER with compiletime detected macro POCO_HAVE_SENDFILE replace types for sendFile with platform depended wrap possibility of using sendFile with macro, if sendFile doesn't exist in OS, then all methods don't exist * remove option POCO_USE_SENDFILE_FOR_HTTPSERVER from ci.yml * wrap testSendFile in the suite with define POCO_HAVE_SENDFILE * try fix compile problem with emscripten * oh, emscripten again * fix logical error in testSendFile * fix problem with cmake-specific macro when usinf make-project * revert types from platform depended to Poco::Int64 and Poco::UInt64 for sendfile
44 lines
713 B
C++
44 lines
713 B
C++
//
|
|
// SocketStreamTest.h
|
|
//
|
|
// Definition of the SocketStreamTest class.
|
|
//
|
|
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#ifndef SocketStreamTest_INCLUDED
|
|
#define SocketStreamTest_INCLUDED
|
|
|
|
|
|
#include "Poco/Net/Net.h"
|
|
#include "CppUnit/TestCase.h"
|
|
|
|
|
|
class SocketStreamTest: public CppUnit::TestCase
|
|
{
|
|
public:
|
|
SocketStreamTest(const std::string& name);
|
|
~SocketStreamTest();
|
|
|
|
void testStreamEcho();
|
|
void testLargeStreamEcho();
|
|
void testEOF();
|
|
#ifdef POCO_HAVE_SENDFILE
|
|
void testSendFile();
|
|
#endif
|
|
|
|
void setUp();
|
|
void tearDown();
|
|
|
|
static CppUnit::Test* suite();
|
|
|
|
private:
|
|
};
|
|
|
|
|
|
#endif // SocketStreamTest_INCLUDED
|