The base class doesn't need the SocketBackendHandler. I put it there for convenience, assuming that a client would only ever connect to a single server. But with an asynchronous handler implementation, or a multi-threaded synchronous implementation, it would be possible to query several message boards in parallel. It's also questionable whether such implementations would use the command-line related SocketBackendHandler interface at all. Other helpers of the base class would still be useful though.
Move the socketBackend attribute to the implementation class.
The base class doesn't need the
SocketBackendHandler
. I put it there for convenience, assuming that a client would only ever connect to a single server. But with an asynchronous handler implementation, or a multi-threaded synchronous implementation, it would be possible to query several message boards in parallel. It's also questionable whether such implementations would use the command-line relatedSocketBackendHandler
interface at all. Other helpers of the base class would still be useful though.Move the
socketBackend
attribute to the implementation class.