using System;
using Renci.SshNet.Common;
namespace Renci.SshNet.Messages.Transport
{
///
/// Represents SSH_MSG_SERVICE_ACCEPT message.
///
[Message("SSH_MSG_SERVICE_ACCEPT", MessageNumber)]
public class ServiceAcceptMessage : Message
{
internal const byte MessageNumber = 6;
///
/// Gets the name of the service.
///
///
/// The name of the service.
///
public ServiceName ServiceName { get; private set; }
///
/// Called when type specific data need to be loaded.
///
protected override void LoadData()
{
#if TUNING
ServiceName = ReadBinary().ToServiceName();
#else
var serviceName = ReadAsciiString();
switch (serviceName)
{
case "ssh-userauth":
ServiceName = ServiceName.UserAuthentication;
break;
case "ssh-connection":
ServiceName = ServiceName.Connection;
break;
}
#endif
}
///
/// Called when type specific data need to be saved.
///
protected override void SaveData()
{
throw new NotImplementedException();
}
}
}