_parseEndpoints(listenOn, fieldName) {
        let result = [];
        if (listenOn !== undefined) {
            assert(Array.isArray(listenOn)
                && listenOn.every(e => typeof e === 'string'),
                `bad config: ${fieldName} must be a list of strings`);
            result = listenOn.map(item => {
                const lastColon = item.lastIndexOf(':');
                // if address is IPv6 format, it includes brackets
                // that have to be removed from the final IP address
                const ipAddress = item.indexOf(']') > 0 ?
                    item.substr(1, lastColon - 2) :
                    item.substr(0, lastColon);
                // the port should not include the colon
                const port = item.substr(lastColon + 1);
                assert(Number.parseInt(port, 10),
                    `bad config: ${fieldName} port must be a positive integer`);
                return { ip: ipAddress, port };
            });
        }
        return result;
    }
Parse list of endpoints.
@param {string[] | undefined} listenOn - List of string of the form "ip:port"
@param {string} fieldName - Name of field being parsed
@returns {{ip: string, port: number}[]} - List of ip/port pairs