Beispiel #1
0
        static public Socket Parse(string txt)
        {
            var splitted = txt.Split(Separator);

            if (splitted.Length == 1)
            {
                return(new Socket(
                           HostA.Parse(txt)
                           ,
                           null

                           ));
            }
            if (splitted.Length == 2)
            {
                return(new Socket(
                           HostA.Parse(splitted[0])
                           ,
                           Port1.Parse(splitted[1])
                           ));
            }

            throw new nilnul.exception_.ParseException();
        }