private void InitSyslogServer()
        {
            var tcpEndPoint = EndPoint("tcpIp", "tcpPort");
            var udpEndPoint = EndPoint("udpIp", "udpPort");

            Action<ProtocolType, string> appendStringAction = (protocolType, recString) =>
            {
                var textBox = protocolType == ProtocolType.Udp ? udpTextBox : tcpTextBox;
                textBox.AppendText(recString);
                textBox.AppendText(Environment.NewLine);
            };
            Action<Task> msgBoxAction = task => MessageBox.Show(this, task.Exception?.GetBaseException().ToString());

            receivedStringAction = (protocolType, recString) => Invoke(appendStringAction, protocolType, recString);
            exceptionAction = task => Invoke(msgBoxAction, task);

            syslogServer = new SyslogServer(udpEndPoint, tcpEndPoint);
        }
        private void InitSyslogServer()
        {
            var tcpEndPoint = EndPoint("tcpIp", "tcpPort");
            var udpEndPoint = EndPoint("udpIp", "udpPort");

            Action <ProtocolType, string> appendStringAction = (protocolType, recString) =>
            {
                var textBox = protocolType == ProtocolType.Udp ? udpTextBox : tcpTextBox;
                textBox.AppendText(recString);
                textBox.AppendText(Environment.NewLine);
            };
            Action <Task> msgBoxAction = task => MessageBox.Show(this, task.Exception?.GetBaseException().ToString());

            receivedStringAction = (protocolType, recString) => Invoke(appendStringAction, protocolType, recString);
            exceptionAction      = task => Invoke(msgBoxAction, task);

            syslogServer = new SyslogServer(udpEndPoint, tcpEndPoint);
        }