public function bindSockets($addrs = [], $max = 0)
    {
        if (is_string($addrs)) {
            $addrs = array_map('trim', explode(',', $addrs));
        }
        $n = 0;
        foreach ($addrs as $addr) {
            if ($this->bindSocket($addr)) {
                ++$n;
            }
            if ($max > 0 && ($n >= $max)) {
                return $n;
            }
        }
        return $n;
    }