Design question: Should the client both create the session and the socket?
- by the_drow
I have three classes:
Client
Session
Socket
Both Session & Socket depeand on the Client to create both objects.
A Session depeands on a Socket and no sockets are created without a session.
Should the Client have a function that creates a Session pubically and a Socket privately?
Doesn't it violate the law of demeter?