Files
poco/Net/testsuite/src/SocketStreamTest.h
Alexander B 710c2a41f3 Using native sendfile from OS for HttpServer (#4351)
* 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
2024-09-01 20:45:33 +02:00

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