Lines Matching defs:std
169 std::vector<std::pair<StringRef, StringRef>> cmdcfgs;
207 const std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>>
245 std::chrono::steady_clock::time_point termination_deadline;
248 std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>> cid_prefixes;
257 std::deque<std::unique_ptr<WorkerProcess>> worker_processes;
267 auto now = std::chrono::steady_clock::now();
268 auto next_repeat = std::chrono::steady_clock::duration::zero();
270 for (auto it = std::begin(worker_processes);
271 it != std::end(worker_processes);) {
281 if (next_repeat == std::chrono::steady_clock::duration::zero() ||
318 std::chrono::steady_clock::now() +
331 void worker_process_add(std::unique_ptr<WorkerProcess> wp) {
332 worker_processes.push_back(std::move(wp));
338 for (auto it = std::begin(worker_processes); it != std::end(worker_processes);
370 std::deque<std::unique_ptr<WorkerProcess>>().swap(worker_processes);
392 std::array<char, STRERROR_BUFSIZE> errbuf;
399 auto buf = std::make_unique<char[]>(len + 1);
402 p = std::copy(std::begin(pid_file), std::end(pid_file), p);
403 p = std::copy(std::begin(SUFFIX), std::end(SUFFIX), p);
472 std::array<char, STRERROR_BUFSIZE> errbuf;
532 auto argv = std::make_unique<char *[]>(suconfig.argc + 1);
548 auto envp = std::make_unique<char *[]>(envlen + listenerconf.addrs.size() +
552 std::vector<ImmutableString> fd_envs;
578 std::vector<ImmutableString> quic_lwps;
640 std::array<char, STRERROR_BUFSIZE> errbuf;
725 std::vector<InheritedAddr> &iaddrs) {
726 std::array<char, STRERROR_BUFSIZE> errbuf;
727 auto found = std::find_if(
728 std::begin(iaddrs), std::end(iaddrs), [&faddr](const InheritedAddr &ia) {
732 if (found != std::end(iaddrs)) {
779 std::copy_n(faddr.host.c_str(), faddr.host.size() + 1, addr.un.sun_path);
814 std::vector<InheritedAddr> &iaddrs) {
815 std::array<char, STRERROR_BUFSIZE> errbuf;
851 std::array<char, NI_MAXHOST> host;
863 auto found = std::find_if(std::begin(iaddrs), std::end(iaddrs),
870 if (found != std::end(iaddrs)) {
982 std::vector<InheritedAddr>
984 std::array<char, STRERROR_BUFSIZE> errbuf;
989 std::vector<InheritedAddr> iaddrs(listenerconf.addrs.size());
1025 std::array<char, NI_MAXHOST> host;
1045 std::vector<InheritedAddr> get_inherited_addr_from_env(Config *config) {
1046 std::array<char, STRERROR_BUFSIZE> errbuf;
1048 std::vector<InheritedAddr> iaddrs;
1060 std::string value = "tcp,";
1071 std::string value = "unix,";
1109 << std::string(value, endfd - value);
1129 iaddrs.push_back(std::move(addr));
1164 std::array<char, NI_MAXHOST> host;
1183 iaddrs.push_back(std::move(addr));
1194 void close_unused_inherited_addr(const std::vector<InheritedAddr> &iaddrs) {
1219 std::vector<QUICLingeringWorkerProcess>
1224 std::vector<QUICLingeringWorkerProcess>
1226 std::vector<QUICLingeringWorkerProcess> iwps;
1242 auto end_fd = std::find(env, envend, ',');
1261 std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>> cid_prefixes;
1265 auto end = std::find(p, envend, ',');
1280 util::decode_hex(std::begin(cid_prefixes.back()), hex_cid_prefix);
1289 iwps.emplace_back(std::move(cid_prefixes), fd);
1298 int create_acceptor_socket(Config *config, std::vector<InheritedAddr> &iaddrs) {
1299 std::array<char, STRERROR_BUFSIZE> errbuf;
1352 int create_ipc_socket(std::array<int, 2> &ipc_fd) {
1353 std::array<char, STRERROR_BUFSIZE> errbuf;
1375 int create_worker_process_ready_ipc_socket(std::array<int, 2> &ipc_fd) {
1376 std::array<char, STRERROR_BUFSIZE> errbuf;
1400 int create_quic_ipc_socket(std::array<int, 2> &quic_ipc_fd) {
1401 std::array<char, STRERROR_BUFSIZE> errbuf;
1422 std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>> &cid_prefixes,
1454 std::vector<QUICLingeringWorkerProcess>
1456 std::vector<QUICLingeringWorkerProcess> quic_lwps{
1457 std::begin(inherited_quic_lingering_worker_processes),
1458 std::end(inherited_quic_lingering_worker_processes)};
1507 std::array<int, 2> worker_process_ready_ipc_fd;
1522 std::array<uint8_t, 8> buf;
1529 std::array<char, STRERROR_BUFSIZE> errbuf;
1606 const std::vector<InheritedAddr> &iaddrs
1609 const std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>>
1611 const std::vector<QUICLingeringWorkerProcess> &quic_lwps
1614 std::array<char, STRERROR_BUFSIZE> errbuf;
1618 std::array<int, 2> ipc_fd;
1626 std::array<int, 2> quic_ipc_fd;
1788 std::array<char, STRERROR_BUFSIZE> errbuf;
1838 std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>> cid_prefixes;
1872 worker_process_add(std::make_unique<WorkerProcess>(loop, pid, ipc_fd
1982 tlsconf.session_timeout = std::chrono::hours(12);
2009 httpconf.max_requests = std::numeric_limits<size_t>::max();
2157 connconf.downstream = std::make_shared<DownstreamConfig>();
2191 void print_version(std::ostream &out) {
2196 << std::endl;
2201 void print_usage(std::ostream &out) {
2204 << std::endl;
2209 void print_help(std::ostream &out) {
3633 << std::endl;
3639 std::vector<std::pair<StringRef, StringRef>> &cmdcfgs) {
3640 std::array<char, STRERROR_BUFSIZE> errbuf;
3641 std::map<StringRef, size_t> pattern_addr_indexer;
3644 std::set<StringRef> include_set;
3657 std::set<StringRef> include_set;
3792 listenerconf.addrs.push_back(std::move(addr));
3796 upstreamconf.worker_connections = std::numeric_limits<size_t>::max();
3822 std::array<char, util::max_hostport> hostport_buf;
3826 auto hostport = util::make_hostport(std::begin(hostport_buf),
3840 auto hostport = util::make_hostport(std::begin(hostport_buf),
3862 auto hostport = util::make_hostport(std::begin(hostport_buf),
3946 const std::vector<InheritedAddr> &iaddrs) {
3950 auto inherited = std::find_if(
3951 std::begin(iaddrs), std::end(iaddrs),
3954 if (inherited != std::end(iaddrs)) {
3970 auto new_config = std::make_unique<Config>();
4005 std::vector<std::array<uint8_t, SHRPX_QUIC_CID_PREFIXLEN>> cid_prefixes;
4016 auto old_config = replace_config(std::move(new_config));
4035 new_config = replace_config(std::move(old_config));
4043 worker_process_add(std::make_unique<WorkerProcess>(loop, pid, ipc_fd
4060 std::array<char, STRERROR_BUFSIZE> errbuf;
4416 print_help(std::cout);
4435 print_version(std::cout);