Beispiel #1
0
        public static ClientSocketSetup ParseHostPort(string hostPort)
        {
            var hostAndPort = hostPort.Split(':');
            if (hostAndPort.Length != 2)
                throw new Exception("Invalid hostPort : [" + hostPort + "]");

            var result = new ClientSocketSetup { Host = hostAndPort[0], Port = int.Parse(hostAndPort[1]) };
            return result;
        }
Beispiel #2
0
        public static ClientSocketSetup ParseHostPort(string hostPort)
        {
            var hostAndPort = hostPort.Split(':');

            if (hostAndPort.Length != 2)
            {
                throw new Exception("Invalid hostPort : [" + hostPort + "]");
            }

            var result = new ClientSocketSetup {
                Host = hostAndPort[0], Port = int.Parse(hostAndPort[1])
            };

            return(result);
        }