25 Commits

Author SHA1 Message Date
John Galt 0e8d31aafd networkmanager: catch queued send failures 2026-05-19 19:03:35 +02:00
John Galt 2a07f278b2 networkmanager: validate legacy p2p envelopes 2026-05-19 18:09:19 +02:00
John Galt c9e805195a networkmanager: bound native parser to packet 2026-05-19 17:44:04 +02:00
John Galt 1713c8f940 networkmanager: reject short native packets 2026-05-19 10:22:58 +02:00
John Galt 79b389caf6 networkmanager: keep ring buffer full state distinct 2026-05-19 10:22:58 +02:00
tomFlowee 49324fad28 Limit linking to only needed boost libs.
We now removed the need for Boost:chrono in all the libs, to avoid
accidentally linking to it again this change makes the apps link to
the actual specific libs instead of just all.
2025-03-07 15:36:36 +01:00
tomFlowee 25c0ad9650 Redo the callback handling in the proxy
This makes the unit test work, specifically it ensures the callbacks are
done in the strand.
2025-02-11 19:23:14 +01:00
tomFlowee bb7275466b Stop using deprecated asio io_service
This ports the io-service to the source compatible io-context
class, with the most work going to the WorkerThreads which owns
that one.
2025-02-08 19:05:26 +01:00
tomFlowee b060064d45 Cleanups 2024-08-21 19:45:32 +02:00
tomFlowee 3a25af6f0e Complete the new SSL connections in networkmanager
This completes the API and makes the unit test pass.
2024-08-21 17:58:45 +02:00
tomFlowee 7fcecedd76 Make handshake of ssl connection work. 2024-08-21 16:55:01 +02:00
tomFlowee 69b3d78e19 Making the ssl unit test work. 2024-08-20 22:46:48 +02:00
tomFlowee 151c080642 Start unit test. 2024-08-19 21:53:21 +02:00
tomFlowee c324f675d2 rename the unit test to be about the flowee libs 2024-08-11 18:49:35 +02:00
tomFlowee 9f16d67460 Make API more robust
this avoids the endPoint() method sometimes throwing an exception from
std::map::at confusing the caller.
2023-07-20 20:59:26 +02:00
tomFlowee ae78dd0bb8 Update email address 2021-06-20 22:44:44 +02:00
tomFlowee afce2134fd Fix include 2020-12-24 12:52:48 +01:00
TomZ 7afefefa41 Improve NWM flow-control
The NetworkManager now has more mature flow-control which means that we
send our buffers more regularly and we delay parsing received data if the
sending takes too long.

The direct effect should be that creating of a large number of messages
in response to incoming messages is no longer a problem in many cases.
2020-09-17 21:04:28 +02:00
TomZ d49b1ae5e2 Make NetworkManager connections leaner
The NetworkManager usage was mostly for low connection counts and this
made defaults selection easy.
With more usages it is important to allow the NWM-connection to be more
configurable about memory usage and leaner in general.

This changes the headers-buffers (used to create envelopes) to not be per
connection anymore but per thread using the tread_local keyword.

This changes the ring-buffers to become configurable using
NetworkConnections::setMessageQueueSizes().

Also removing some include statements where they were not really needed
in the P2PNet lib.
2020-05-09 20:23:05 +02:00
TomZ 09b4e5050e Make link under strictness rules
This re-adds the flowee_utils lib which was implied and should have
been auto-added by cmake, but it failed to link for AUR strictness
settings.
2020-03-19 16:08:56 +01:00
TomZ f7f4ea0093 make testing/streaming not link to flowee_server
Also split the testlib into two static libraries and avoid
recompile of the base test file in each test that used it.
2019-12-30 17:55:48 +01:00
TomZ 0c9f415eb8 Several NetworkManager fixes
This adds all the header ints to chunked messages, solving the problem
of losing RequestId on roundtrips if the answer was too big.

Added a unit test for this "new" features.

This makes callbacks all use shared_from_this() in order to avoid
callbacks being done on deleted instances (thanks boost!).

Last, special case when the user doesn't connect but just sends messages
which caused a send of data, only to realize the connection wasn't open,
and then a connect.
This makes sure we immediately start a connect on queue of a message.
2019-06-04 21:40:02 +02:00
TomZ 519cd1b6fc Work on stability of the NetworkManager
In extreme cases we might end up going over the bounds of the internal
buffers, as such myConnection.send() may now throw.

I also cleaned up the ping design and made it a bit more strict.
Last I increased the amount of incoming data I can receive in one go,
this will make throughput higher.
2019-04-01 10:57:42 +02:00
TomZ a8dd567006 Add unit test for the ring buffer class. 2019-03-24 11:43:43 +01:00
TomZ 6b29387801 Move NetworkManager unit test to own executable 2019-03-24 10:23:52 +01:00