handleMSG_USERAUTH_SUCCESS method

void handleMSG_USERAUTH_SUCCESS()

After successfull authentication, open the session channel and start compression.

Implementation

void handleMSG_USERAUTH_SUCCESS() {
  if (tracePrint != null) {
    tracePrint('$hostport: MSG_USERAUTH_SUCCESS');
  }
  sessionChannel =
      Channel(localId: nextChannelId, windowS: initialWindowSize);
  channels[nextChannelId] = sessionChannel;
  nextChannelId++;

  if (compressIdC2s == Compression.OpenSSHZLib) {
    // zwriter = ArchiveDeflateWriter();
    throw FormatException('compression not supported');
  }
  if (compressIdS2c == Compression.OpenSSHZLib) {
    // zreader = ArchiveInflateReader();
    throw FormatException('compression not supported');
  }
  writeCipher(MSG_CHANNEL_OPEN(
      'session', sessionChannel.localId, initialWindowSize, maxPacketSize));
  for (VoidCallback successCallback in success) {
    successCallback();
  }
}