Centreon_EventLog_2_Syslog.SyslogServer.SetProtocol C# (CSharp) Method

SetProtocol() private method

Set and control protocol
private SetProtocol ( String protocol ) : void
protocol String Protocol: UDP or TCP
return void
        private void SetProtocol(String protocol)
        {
            if ((protocol.ToLower().CompareTo("udp") == 0) || (protocol.ToLower().CompareTo("tcp") == 0))
            {
                this._Protocol = protocol;
            }
            else
            {
                ArgumentOutOfRangeException ex = new ArgumentOutOfRangeException("Argument must be UDP or TCP");
                throw ex;
            }
        }