Project

General

Profile

Actions

Bug #3318

closed

Missing beforeChangePersistency override in some Transport subclasses

Added by Davide Pesavento about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Not all Transport subclasses currently available in NFD implement an overridden beforeChangePersistency method, although they all should. Specifically:

  • MulticastUdpTransport only supports permanent
  • UnicastUdpTransport supports all 3 kinds of persistency, but not all transitions are allowed (this logic is currently in UdpChannel but it should be removed from there)
  • UnixStreamTransport only supports on-demand
  • TcpTransport currently implements an override which accepts the transition on-demand <-> persistent in either direction, I'm not sure if this is correct (what's the difference semantically between on-demand and persistent in the TCP case anyway?)
  • InternalForwarderTransport only supports permanent

EthernetTransport and WebSocketTransport already implement a correct override as far as I can see.

I also propose to make Transport::beforeChangePersistency pure virtual. The reason is that the great majority of transports will have some kind of restriction in their persistency setting, therefore a pure virtual method ensures that subclasses won't forget to override it.

Actions

Also available in: Atom PDF