[stratumv2]: Refactor Peer struct
ccdle12 opened this issue · 0 comments
ccdle12 commented
Refactor the Peer struct by removing the cached SetupConnection
in the struct, different devices may want to cache different messages relevant to them on sending their initial message for a connection e.g. Proxy might want to cache SetupConnection.Success
where a PoolServer may want to cache SetupConnection
.
Really the decision about what message should be cached should be made upstream (crate, project etc..) and the Peer really just becomes an outbound message buffer of Messages
for a particular Channel/Connection