in reply to Class or Object composition ??

I'm no OO guru, but I believe the decision you're making is termed "Composition vs Inheritance" (Inheritance being your first example, Composition your second).

AFAIK, there is no right or wrong answer to this question. The rule of thumb is only use inheritance if it really is inheritance. That is, if the sub-class "is-a" special case of the base class.

In your example, you have a server with some 'base' funtionality. I'm not clear from the example if this base functionality is actually standalone, i.e. it can be used without sub-classing, it's "abstract". But in either case, using inheritance seems to make sense. There are several examples of this in the Real World (e.g. Catalyst's multiple server modules (for Apache, CGI, etc) are all inherited from one base class).

I would Google "Composition vs Inheritance" for more info (although a lot of stuff on Java of course).

By the way, performance shouldn't really be a consideration here. That's "premature optimisation". Write the code in the way that makes the most sense design-wise (and maintenance-wise). Optimise later if necessary.