sociomantic-tsunami / swarm

Asynchronous client/node framework library
Boost Software License 1.0
14 stars 26 forks source link

Remove deprecated static ifs in RequestMap.addHandler #401

Closed gavin-norman-sociomantic closed 5 years ago

tiyash-basu-sociomantic commented 5 years ago

LGTM. All tests pass with dhtproto.

matthias-wende-sociomantic commented 5 years ago

Same idea as Tiyash had (https://github.com/sociomantic-tsunami/dlsproto/pull/110#discussion_r285024023). We might want to add (final) getter/setter functions to the IRequest interface to enforce derived classes to add the timing and scheduled_for_removal members.

gavin-norman-sociomantic commented 5 years ago

The reason for not being able to add these fields to the interface is that they're static. They're used at run-time in the addHandler template to check for certain properties of the request type.