We have a base TCP Server class which provides Server functionallity. Now we want to provided secure TCP Server functionality as well. There were two approaches we were debating on.
Pass a value to TCP server constructor, indication whether it should act as TCPServer or TCP secure server.
Create a TCPSecure class inheriting from TCP Server class, this will require overiding few of the methods of base class.
The first approach has benefits that it will keep everything in a single class.
The second approach looks more correct design wise. But we dont expect more types of derivation happening. So is it worth introducing a new class for this?
Thanks in advance.