hMailServer.Administrator.Utilities.Localization.InternalNames.GetPortName C# (CSharp) Method

GetPortName() public static method

public static GetPortName ( hMailServer port ) : string
port hMailServer
return string
        public static string GetPortName(hMailServer.TCPIPPort port)
        {
            string ipAddress = port.Address;
             string portNumber = port.PortNumber.ToString();
             string protocolName = "";
             switch (port.Protocol)
             {
            case eSessionType.eSTIMAP:
               protocolName = "IMAP";
               break;
            case eSessionType.eSTPOP3:
               protocolName = "POP3";
               break;
            case eSessionType.eSTSMTP:
               protocolName = "SMTP";
               break;
             }

             return ipAddress + " / " + portNumber + " / " + protocolName;
        }