Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Inheritance for CPE #59

Open
GiantCrocodile opened this issue Aug 21, 2018 · 2 comments
Open

Inheritance for CPE #59

GiantCrocodile opened this issue Aug 21, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@GiantCrocodile
Copy link
Contributor

I think CPE should be a class which inherits from Protocol and Packet should be an inner class of Protocol?

@vexyl
Copy link
Owner

vexyl commented Aug 22, 2018

I do not think CPE should inherit from Protocol, but they should both inherit from some (pure?) abstract base class. See issue #44. Packet inherits from BufferStream, and I'm not sure if it is a good idea to put it under Protocol as it should be used for all protocols not just classic (which suggests that Protocol is poorly named).

@GiantCrocodile
Copy link
Contributor Author

GiantCrocodile commented Aug 22, 2018

I think there should be a abstract/virtual class which is called Protocol and then you got ClassicProtocol and ClassicProtocolExtended. I don't see a reason for Packet class in its current state - it is in detail implemented and I'm not sure other implementations fit better for other protocols. Maybe there should be a Package class to inherit from (like Protocol class) and you provide a default one (like the currently existing one).

@vexyl vexyl added the enhancement New feature or request label Aug 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants