Centreon_EventLog_2_Syslog.SyslogServer.SetProtocol C# (CSharp) 메소드

SetProtocol() 개인적인 메소드

Set and control protocol
private SetProtocol ( String protocol ) : void
protocol String Protocol: UDP or TCP
리턴 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;
            }
        }