Its a development of PR 1951.
Basically at the moment broadcast packets go like this with methods spercific to each packet in every class.
cWorld -> cChunkMap -> cChunk -> cClientHandle (for each client) -> cProtocol (for each client) -> cClientHandle -> cTCPLink.
I'm trying to change it to this, where classes on the lower line are providing a generalized API.
Longer tem I suspect the better solution would be to split the data sending parts of cClientHandle out into a separate class, then remove all of cProtocol's dependencies on cClientHandle, but I don't want to get into a second refactor in the middle of this one.
Basically at the moment broadcast packets go like this with methods spercific to each packet in every class.
cWorld -> cChunkMap -> cChunk -> cClientHandle (for each client) -> cProtocol (for each client) -> cClientHandle -> cTCPLink.
I'm trying to change it to this, where classes on the lower line are providing a generalized API.
Code:
cBroadcaster cChunkBroadcastManager -> cProtocol(For every protocol version) -> cClientHandle -> cTCPLink
v ^
cWorld -> cChunkMap -> cChunk
Longer tem I suspect the better solution would be to split the data sending parts of cClientHandle out into a separate class, then remove all of cProtocol's dependencies on cClientHandle, but I don't want to get into a second refactor in the middle of this one.