transitionAfterRead method
void
transitionAfterRead()
Transitions to the next state after a successful read
Implementation
void transitionAfterRead() {
validateRead();
switch (_state) {
case XXHandshakeState.initial:
_state = XXHandshakeState.sentE;
break;
case XXHandshakeState.sentE:
_state = XXHandshakeState.sentEES;
break;
case XXHandshakeState.sentEES:
_state = XXHandshakeState.complete;
break;
default:
throw StateError('Invalid state transition from $_state');
}
}