Something like a state-enum. For example, a ConnectedState always has a Server. This would decrease the amount of raw unwraps and implicit state assumptions.
We still need something that owns tcp/udp which shouldn't have to worry about which enum state we're in as long as we keep sending StatePhases.
Something like a state-enum. For example, a
ConnectedState
always has aServer
. This would decrease the amount of raw unwraps and implicit state assumptions.We still need something that owns tcp/udp which shouldn't have to worry about which enum state we're in as long as we keep sending
StatePhase
s.