Closed jaros1 closed 6 years ago
Added optional fileGet and decrypt to demon process in MoneyNetworkAPI.
fileGet and decrypt removed from MN
Moved fileGet and decrypt for incoming messages to MoneyNetworkAPILib.demon. OK for MN and W2. Todo: add special processing for published messages and implement 16 seconds limit between commits
Added MN publish queue.
MoneyNetworkAPI should keep track of minimum interval between publish (16 seconds).
There already is a z_site_publish function in MN API. Must be extended to check for minimum interval between publish. And should also be extended for retry after failed published (30, 60, 120, 240 seconds between failed publish). z_site_publish will keep track of this client publishing.
Between MN clients (MN and wallet sessions) API messages publish_started, get_published and published are being used to exchange last published timestamp.
Now demon process is just sending filenames for new incoming messages to client code (process_incoming_messages callback) and fileGet and decrypt is done in callback code. It could be nice to let the demon fileGet and decrypt publish_started and published messages as information about last published timestamp is in MoneyNetworkAPILib.
Maybe an MoneyNetworkAPILib or MoneyNetworkAPI instance option to tell demon process to perform fileGet and decrypt operation before sending message to client.
Or maybe a special -p file -flag for published messages? Now using -i, -e, -o and -io filename extensions. Use -p extension for internal publish messages?