--- /dev/null
+#include "receiver.h"
+
+namespace Msp {
+namespace Net {
+
+void DynamicDispatcher::receive(unsigned packet_id, const Variant &packet)
+{
+ auto i = lower_bound_member(targets, packet_id, &Target::packet_id);
+ if(i==targets.end() || i->packet_id!=packet_id)
+ throw key_error(packet_id);
+
+ i->func(*i->receiver, packet);
+}
+
+} // namespace Net
+} // namespace Msp