transitionAfterWrite method

void transitionAfterWrite()

Transitions to the next state after a successful write

Implementation

void transitionAfterWrite() {
  validateWrite();
  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');
  }
}