Commit Graph

18 Commits

Author SHA1 Message Date
TomZ 3343b7a2b2 Share binding code with bitcore-proxy
Additionally, support optional port argument.
2020-11-16 23:09:17 +01:00
TomZ 960e3afeb2 Redo binding logic in all Qt
Avoid conversion to and from boost and this solves the issue of trying
to listen to multiple interfaces not working very well.
2020-11-16 22:45:46 +01:00
TomZ bdcf8ad45c Show version in the start message
This is used by various apps, like indexer. They will now display
something like:

Flowee indexer starting. Version: 2020-7.0 (v1)
2020-11-16 18:59:25 +01:00
TomZ 370abe4c1e Follow several code-check suggestions
Also print a line explaining which file the logs go to in case there
is no config.
2020-08-26 14:08:03 +02:00
TomZ d573e307c3 Refactor; move SplitHostPort to utilstrencodings 2019-11-12 15:35:54 +01:00
TomZ c6e48e2e11 Be much more consistent with our types
(socket) ports are uint16_t
log-debug sections are shorts.
2019-09-12 15:23:30 +02:00
TomZ c5c25a5e29 Minor usability fix
Avoid confusing naming and consistent casing.
2019-09-08 20:51:25 +02:00
TomZ 844747fa65 Make configurable which cli options to allow. 2019-08-24 22:25:10 +02:00
TomZ c3ddab9cd4 Make Indexer bind to localhost as default 2019-08-24 22:25:10 +02:00
TomZ a7f4e942f9 Add README for indexer 2019-06-06 20:15:01 +02:00
TomZ d10e50803c Avoid warnings from Qt.
Lets not ask about m_verbose when we didn't add it to the parser at all.
2019-06-03 21:39:37 +02:00
TomZ 08ca3c59c9 Set sane default log levels 2019-06-03 10:59:33 +02:00
TomZ b6faee185b signal reparseConfig on FloweeServiceApplication
When a user sends a signal SIGHUP, we parse the configs again
traditionally on Unix.
We already use this for log-configs.
This signal allows apps to get notification and reload their
own configs.
2019-06-03 10:59:33 +02:00
TomZ 7203a058a3 Change API call SplitHostPort slightly
Instead of taking an int for the port, take a short.
This matches better with the networkmanager EndPoint struct.
2019-06-02 20:16:49 +02:00
TomZ 1f52ae7a7f FloweeServiceApplication: support net wildcard
For service applications that bind to networks (currently
only indexer) this allows users to pass the address:
    0.0.0.0
to bind to. The effect will be that we find all the network
interfaces in the system and bind to all of them.
Notice that we already had "localhost" as an alias to bind to both
v4 and v6 loopback interfaces.

This new feature depends on optional dependency QtNetwork.
2019-05-17 12:32:11 +02:00
TomZ ba2216d582 Add to CLI clients verbose/quiet options
All client apps (=connecting to a server only) now gained the  verbose
and quiet command line arguments to select a different level of
verbosity.

Servers don't need this as they use a config file.

This also makes the --debug option only for debug builds as the logging
system already doesn't compile in debug statements otherwise, it makes
little sense to try to print them.
2019-05-13 18:27:09 +02:00
TomZ 5b155600d9 Make app arguments more consitent
Now everyone auto-connects to localhost unless passed the
option --connect=

Also make indexer find the logs.conf from the same dir as the
commandline passed config file.

This makes running it as a service more useful.
2019-05-09 12:16:11 +02:00
TomZ 8d81cc5471 Create new lib apputils
This lib depends on QtCore, as such it is separated from other libs. As
many apps depend on QtCore we can share classes here to avoid
duplication.
2019-05-07 20:53:22 +02:00