I did not find a better title for the question. Let me explain this now:
The project I'm working on is going to connect to a remote server, encrypt the session and send / receive data packets. I would like to make it modular enough, so I thought it would be nice to use 3 different classes. This will:
1) A socket wrapper class with some virtual methods such as OnReceivedData () and OnConnected ().
2) An inherited socket-shell class that implements data encryption before sending it and decrypting data upon arrival.
3) The main object itself, which must override any of the above classes depending on whether it is necessary to encrypt it or not, so that it can receive notifications about the OnReceivedData () and OnConnected () events and act on this basis.
So the problem is, how can I make my program know that it must first trigger an event on the encryption object and then trigger the same event on the main object? Since I assume that if I redefine the wapper socket using encryption and then redefine encryption using the main object, it will probably just call the method of the main object (it will call OnReceivedData () directly on the main object, and not through decrypting the object first, right?).
Is this multiple inheritance?
, , , .
, , .