Commit Graph

855 Commits

Author SHA1 Message Date
Günter Obiltschnig
1811f2f35c fix(NetSSL): shutdown behavior 2024-11-28 08:19:45 +01:00
Matej Kenda
76ea8c74c8 enh(C++17): Net: Modernisation of socket class declarations. 2024-11-19 21:45:40 +01:00
Matej Kenda
efb0745efc enh(SocketReactor): Introduce protected accessors to private members to be used in derived classes. 2024-11-19 21:45:40 +01:00
Milan Tepic
64d8777a0e feat(WindowsBuild): customizable path to include for pocoNetworkInitializer #4769 2024-11-19 16:40:51 +01:00
Günter Obiltschnig
2815ea45a9 enh(Net): add PollSet::size(); mark PollSet::count() as deprecated 2024-11-17 22:16:52 +01:00
Günter Obiltschnig
163509eb57 fix(WebSocket): re-add assignment operators 2024-11-16 18:56:03 +01:00
Günter Obiltschnig
63b4bfd8ba chore(WebSocket): docs 2024-11-16 18:42:38 +01:00
Günter Obiltschnig
cedd086362 feat(Net): Non-blocking WebSocket #4773 2024-11-16 16:49:50 +01:00
Günter Obiltschnig
5d69308bfd fix(Net): Non-blocking sockets support #4773 2024-11-16 16:48:48 +01:00
Alex Fabijanic
60a45e4bb3 chore: remove misplaced comment 2024-10-31 08:09:52 -05:00
Alex Fabijanic
c3abc7b1ec fix(IPAddress): windows scoped test, part II #4644 2024-10-30 22:41:11 -05:00
Alex Fabijanic
13ea31f442 fix(IPAddress): windows scoped test #4644 2024-10-30 22:16:27 -05:00
Alex Fabijanic
c77d021790 fix(IPAddress): TryParse scoped ipv6 addressess for addresses enclosed in [ ] #4644 2024-10-31 00:39:37 +01:00
Eric Eichhorn
82c17ea813 fix: aix build #4742 2024-10-23 13:51:06 +02:00
tyler92
aa0faed54f
test: move fuzzing tests from google/oss-fuzz repository (#4719) 2024-10-10 13:30:10 +02:00
Aleksandar Fabijanic
eaabd3ff8d
Stack trace (#4691)
* chore(Trace): add dev env settings

* add(Trace): init add Poco::trace and libbacktrace files

* feat(Exception): generate stack trace if enabled at compile time

* chore(DNSSD): remove binaries from git

* fix(Trace): build

* chore(ci): exclude exception text tests for trace build; add debug test script params

* chore(build): mac (dl)

* chore(cmake): Changes to build Trace with CMake.

* chore(cmake): Changes to build Trace on Windows

* chore(cmake): Improvements to include trace sample.

* chore(cmake): Fixes to properly build/link Trace on Linux

* chore(cmake): add_definitions --> add_compile_definitions

* chore(cmake): Build Trace as static and don't export it.

* chore(make): Link Trace with built-in libbacktrace on Linux

* chore(Trace): remove unnecessary sources for libbacktrace.

* chore(github): enable trace on a few github checks

* chore(cmake): Build Trace with clang++ on Linux.

* chore(cmake): Properly set POCO_ENABLE_TRACE globally when needed.

* fix(cmake): Trace: corrected include for clang on Linux

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-10-10 10:36:13 +02:00
Günter Obiltschnig
db1cc9507b fix(Net): HTTPCookie Constructor Fails to Handle Discard Attribute Properly (#4664) 2024-09-26 11:25:44 +02:00
Günter Obiltschnig
42ccb0d96d enh(Net): SMTPClientSession: replace bare newlines in message content with CRLF (#4689) 2024-09-26 11:16:36 +02:00
Mikhail Khachayants
cefab15f9f fix(MailMessage): double free if Content-Disposition is empty 2024-09-13 16:45:38 +02:00
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
Étienne Dupuis
63bed8c8d3 Use Int64 for TcpServerDispatcher::totalConnections(), to prevent overflow 2024-08-26 16:06:47 +02:00
Matej Kenda
f24547cdcf enh(Poco): Mark deprecated functionality with C++ attributes and resolve internal usage of deprecated functions (#4551)
* enh(poco): Replace deprecated comments with C++ deprecated attribute.

* enh(Poco): Replace some deprecated functionality in Poco sources. (#4426)

* enh(Poco): Replace more deprecated functionality in Poco sources. (#4426)

* fix(CMake): Variable BUILD_SHARED_LIBS must be defined properly to create valid binaries.

* enh: Code improvements done while resolving deprecated functionality (#4426)

* Un-deprecate LocalDateTme (#4426)

* enh(Poco): Replace usage of deprecated functionality with other functions/classes (#4426)

* chore(SSL): temporarily un-deprecate SSL-related functionality (#4426)

* chore(SSL): temporarily un-deprecate old MongoDB protocol functionality (#4426)

* enh(Poco): Minor Hash improvements (#4426)

* enh(Foundation): Compile deprecated hash tests only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Net): Compile deprecated Socket::select functionality only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Bonjour): Replace deprecated Socket::select with PollSet (#4426)

* enh(Poco): Introduce POCO_DEPRECATED macro to have the ability to disable deprecation warnings in applications (#4426)

* test(ODBC): add few asserts to testStoredProcedureDynamicVar

* fix(ODBC): rename DynamicAny -> DynamicVar in tests

* fix(ODBC): make Dignostics static members inline to prevent explicit instantiation warnings on windows

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-07-29 08:37:35 +02:00
lanthora
2442c66f84 Add missing momory header file 2024-07-02 17:18:32 +02:00
Günter Obiltschnig
02b59b4d25 fix(Net): #4594: PollSet::poll on Windows always returns immediately after first connection, due to bad event socket implementation 2024-06-26 20:27:06 +02:00
Günter Obiltschnig
c6249d9b3f enh(Net): clear out stored credentials 2024-06-11 12:19:52 +02:00
Alexander B
1a0355f1b7
fix(Net::MessageHeader): Correct RFC 2047 decoding for two consecutive encoded words (#4542)
* fix bug #4535
RFC 2047 decodeWord

* modify logic
uses separate string which contains simbols between chunks and if this
string contains only space ot \n or \t or \v than trim it
2024-04-29 10:54:23 +02:00
Günter Obiltschnig
c8bb5b8cac chore(build): re-generated VS project files 2024-04-03 12:33:13 +02:00
Günter Obiltschnig
401bec5010 style 2024-04-03 07:26:23 +02:00
zhuzeitou
3496e47475
Optimize Net module for Android (#4517)
* epoll is available on Android

* <ifaddrs.h> is introduced in android-24
2024-04-02 19:03:41 +02:00
Andrew Auclair
47c4f073e6
Moving operator<< and operator>> overloads into the Poco::Net namespace. (#4491) 2024-03-28 19:43:14 +01:00
Matej Kenda
482c066307
fix(SecureSocket): Refactor detection of timeout when reading, writing and handshaking (#4510)
* fix(SecureSocket): Refactor detection of timeout when reading, writing or handshaking. (#3725)

* enh(SecureSocket): some trivial C++17 modernisation changes.

* chore: indentation and compiler warning

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-03-27 00:29:58 +01:00
Nicolau Leal Werneck
a5b3c84874
Documentation fixes on DatagramSocket.h and Socket.h (#4489)
* Update DatagramSocket.h

`connect cannot()` -> `connect() cannot`

* Update Socket.h

typo on `setReceiveTiemout`
2024-03-11 10:27:28 +01:00
Matej Kenda
c624b27878 fix(HostEntry): preserve order of addresses and aliases (fixes #3807) 2024-02-28 16:49:26 +01:00
Aleksandar Fabijanic
6b3aab0624 chore(tcpclient): create sample 2024-02-27 12:16:10 +01:00
Aleksandar Fabijanic
3235068545 chore(tcpserver): regenerate vs170 project and add to solution 2024-02-27 11:55:38 +01:00
Günter Obiltschnig
37e17092ff chore: fix vs project files 2024-02-19 22:29:26 +01:00
Alex Fabijanic
30a0a06bac chore(ParallelSocketAcceptor): remove unnecessary include and using from header 2024-02-16 01:00:19 +01:00
Aleksandar Fabijanic
499a7d35f9 fix(build): regenerate VS projects #4453 2024-02-14 00:25:14 +01:00
Aleksandar Fabijanic
c7d16b2a7e
4368 oracle odbc tests (#4410)
* feat(format): Add string_view format type spec #4409

* chore(Types): add demangle

* fix(Data): Oracle failing ODBC tests #4368

* fix some CQL and fuzz warnings; add Var::typeName()

* fix(build): -std=c++17 and c11

* fix windows build

* fix(Foundation): test apps vs projects c++17

* chore(build): remove uneeded compiler flag

* fix(VarHolder): number of digits range check for int->float conversion (reported by CIFuzz)

* fix(test): CIFuzz

* fix(CIFuzz): another attempt

* fix(progen): add LanguageStandard (stdcpp17, stdc11); regenerate vs170 projects

* fix(CiFuzz): add int->float precision loss barrier; fix erroneous number of digits logic

* enh(Var): silent loss of precision on int->float conversion #4423

* enh(Var): silent loss of precision on int->float conversion #4423

* chore(build): remove old build files

* chore: fix missing parens warning

* enh(Thread_POSIX): prevent double-joining; add error description to exceptions

* fix(Data): unresolved Column<long> linkage in test

* fix(demangle): determine type name from template parameter; add eror diagnostic for demangling failures

* chore(buildwin): remove old vs versions from build and progen scripts; update documentation

* chore(buildwin): remove leftover closing curly
2024-01-31 22:07:07 +01:00
Günter Obiltschnig
d5a5ebc2d7 enh: #3890: Get rid of SingletonHolder 2024-01-30 09:56:27 +01:00
Günter Obiltschnig
33638df51e enh: #4216: use std::string literals 2024-01-30 09:35:35 +01:00
Jesse Hoogervorst
5bc04f4c4a
Implemented automated network library initialization for Windows MinGW targets (#4402)
* Implemented automated network library initialization for Windows MinGW/GCC targets

* Using POCO_COMPILER_MINGW instead of __GNUC__

---------

Co-authored-by: Jesse Hoogervorst <jesse@deltaxlab.com>
2024-01-17 14:51:23 +01:00
Aleksandar Fabijanic
b0dc9c5a82
fix(SocketReactorTest): deadlock test intermittently hangs #4400 (#4401) 2024-01-17 09:20:20 +01:00
Matej Kenda
3002777115 fix(MailMessage): Compare lowercase content disposition headers when reading parts (#3650). 2024-01-16 00:49:49 +01:00
Aleksandar Fabijanic
64dbfab0fa
4398 dont install cppunit (#4399)
* chore(SingleSocketPoller): spelling

* fix(CppUnit): do not install #4398

* fix(DataTest): do not install #4398
2024-01-16 00:03:33 +01:00
Matej Kenda
287befc4a3 fix(test): lock std:cerr to prevent data race in TCP server tests (reported by clang thread sanitizer) #4313 2024-01-05 22:57:53 +01:00
Alex Fabijanic
9c7cba6d6c backport leftover 1.12 changes 2023-12-22 20:22:33 +01:00
Kari Argillander
d1d557a4f7 Remove vs140 and vs150 project files
As we now only support C++17 these does not make much sense to keep.
2023-12-18 17:26:13 +01:00
Kari Argillander
bf3c519183
Fix some issues found with clang-tidy (#4353)
* directoryiterator: Fix missing inline

Add missing inline to inline function.

This was found with clang-tidy check:  misc-definitions-in-headers

* Convert deprecated throw() to noexcept

throw() has been deprecated in standar in C++17. It has been removed in
C++20. Code still compiles but let's just define these at those should
be.

These where found with clang-tidy check: modernize-use-noexcept

* Fix unnecessary copy initializations

Clang-tidy did find these with check:

  performance-unnecessary-copy-initialization

* Fix some strings not references

Looks like these are just missing reference marks.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-17 16:55:30 +01:00
Matej Kenda
214b54460e mingw 11: fixes to compile common libraries 2023-12-14 19:02:11 +01:00